[Bug Fix] Fix Empty Groups When Removing Bots (#4178)

# Notes
- We were checking for the incorrect value, meaning you could end up in an empty group.
This commit is contained in:
Alex King 2024-03-13 20:27:38 -04:00 committed by GitHub
parent 95cc22ffbb
commit 4b83a96f64
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3633,7 +3633,7 @@ bool Bot::RemoveBotFromGroup(Bot* bot, Group* group) {
if (group->DelMember(bot)) { if (group->DelMember(bot)) {
group->DelMemberOOZ(bot->GetName()); group->DelMemberOOZ(bot->GetName());
database.SetGroupID(bot->GetCleanName(), 0, bot->GetBotID()); database.SetGroupID(bot->GetCleanName(), 0, bot->GetBotID());
if (group->GroupCount() < 1) { if (group->GroupCount() < 2) {
group->DisbandGroup(); group->DisbandGroup();
} }
} }