summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-07-19 14:16:15 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-07-19 14:16:15 +0200
commitcec9265bdbb63c06d73cb983b3fc293905ed79d2 (patch)
tree3eb53e9c588aae2b950dc345b12b6b7c1a52981d
parent2120c5b59857ac8afba6a5b7d43318ee9189ca78 (diff)
Erase local users from UserManager::local_list in QuitUser()
-rw-r--r--src/modules/m_spanningtree/main.cpp2
-rw-r--r--src/usermanager.cpp4
-rw-r--r--src/users.cpp1
3 files changed, 3 insertions, 4 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index 3393539cc..979048d65 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -59,6 +59,8 @@ namespace
{
void SetLocalUsersServer(Server* newserver)
{
+ // Does not change the server of quitting users because those are not in the list
+
ServerInstance->FakeClient->server = newserver;
const LocalUserList& list = ServerInstance->Users->local_users;
for (LocalUserList::const_iterator i = list.begin(); i != list.end(); ++i)
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index 37f64b9d2..9c04c7889 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -193,6 +193,7 @@ void UserManager::QuitUser(User* user, const std::string& quitreason, const std:
if (lu->registered == REG_ALL)
ServerInstance->SNO->WriteToSnoMask('q',"Client exiting: %s (%s) [%s]", user->GetFullRealHost().c_str(), user->GetIPString().c_str(), operreason->c_str());
+ local_users.erase(lu);
}
if (!clientlist.erase(user->nick))
@@ -287,9 +288,6 @@ void UserManager::DoBackgroundUserStuff()
{
LocalUser* curr = *i;
- if (curr->quitting)
- continue;
-
if (curr->CommandFloodPenalty || curr->eh.getSendQSize())
{
unsigned int rate = curr->MyClass->GetCommandRate();
diff --git a/src/users.cpp b/src/users.cpp
index 246efd7cf..3f82b850c 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -330,7 +330,6 @@ CullResult User::cull()
CullResult LocalUser::cull()
{
- ServerInstance->Users->local_users.erase(this);
ClearInvites();
eh.cull();
return User::cull();