diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-01-25 12:15:01 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-01-25 12:15:01 +0100 |
commit | 48869b38e938de4d8dd4cdff486b10348e81f7b6 (patch) | |
tree | 1f358eb6439bcf9f9b78ff8f1a7f426adfd5f5d1 | |
parent | 458168b575663dc7bdb71c651c30320752f22e41 (diff) |
Destroy Memberships of a quitting user in QuitUser() instead of in cull()
-rw-r--r-- | src/channels.cpp | 2 | ||||
-rw-r--r-- | src/usermanager.cpp | 1 | ||||
-rw-r--r-- | src/users.cpp | 5 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index 392657647..20d61e1d4 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -678,8 +678,6 @@ void Channel::UserList(User *user) std::string nick; for (UserMembIter i = userlist.begin(); i != userlist.end(); ++i) { - if (i->first->quitting) - continue; if ((!has_user) && (i->first->IsModeSet(invisiblemode)) && (!has_privs)) { /* diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 13646f225..b5050d91a 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -209,6 +209,7 @@ void UserManager::QuitUser(User* user, const std::string& quitreason, const std: ServerInstance->Logs->Log("USERS", LOG_DEFAULT, "ERROR: Nick not found in clientlist, cannot remove: " + user->nick); uuidlist->erase(user->uuid); + user->PurgeEmptyChannels(); } void UserManager::AddLocalClone(User *user) diff --git a/src/users.cpp b/src/users.cpp index 32ae87389..2458e1565 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -325,7 +325,6 @@ CullResult User::cull() { if (!quitting) ServerInstance->Users->QuitUser(this, "Culled without QuitUser"); - PurgeEmptyChannels(); if (client_sa.sa.sa_family != AF_UNSPEC) ServerInstance->Users->RemoveCloneCounts(this); @@ -974,7 +973,7 @@ void User::WriteCommonRaw(const std::string &line, bool include_self) for (UserMembList::const_iterator i = ulist->begin(); i != ulist->end(); i++) { LocalUser* u = IS_LOCAL(i->first); - if (u && !u->quitting && u->already_sent != LocalUser::already_sent_id) + if (u && u->already_sent != LocalUser::already_sent_id) { u->already_sent = LocalUser::already_sent_id; u->Write(line); @@ -1014,7 +1013,7 @@ void User::WriteCommonQuit(const std::string &normal_text, const std::string &op for (UserMembList::const_iterator i = ulist->begin(); i != ulist->end(); i++) { LocalUser* u = IS_LOCAL(i->first); - if (u && !u->quitting && (u->already_sent != uniq_id)) + if (u && (u->already_sent != uniq_id)) { u->already_sent = uniq_id; u->Write(u->IsOper() ? operMessage : normalMessage); |