summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-11-17 19:45:38 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-11-17 19:45:38 +0000
commit125a7442f72800dc86b58bcd53e54eb73c3732af (patch)
tree7d31010f154a01b8d2b36bff1089b9dd896206d1
parent4abc2ff167877be048707a8482015b0ffc88d345 (diff)
Fix recursion in QuitUser
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10809 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/cull_list.cpp7
-rw-r--r--src/usermanager.cpp7
2 files changed, 7 insertions, 7 deletions
diff --git a/src/cull_list.cpp b/src/cull_list.cpp
index bfbe518cb..2ec3799cc 100644
--- a/src/cull_list.cpp
+++ b/src/cull_list.cpp
@@ -23,13 +23,6 @@ CullList::CullList(InspIRCd* Instance) : ServerInstance(Instance)
void CullList::AddItem(User* user)
{
- if (user->quitting)
- {
- ServerInstance->Logs->Log("CULLLIST",DEBUG, "*** Warning *** - You tried to quit a user (%s) twice. Did your module call QuitUser twice?", user->nick.c_str());
- return;
- }
-
- user->quitting = true;
list.push_back(user);
}
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index 521dcec41..58c9b4e3e 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -172,8 +172,15 @@ void UserManager::AddUser(InspIRCd* Instance, int socket, int port, bool iscache
void UserManager::QuitUser(User *user, const std::string &quitreason, const char* operreason)
{
+ if (user->quitting)
+ {
+ ServerInstance->Logs->Log("CULLLIST",DEBUG, "*** Warning *** - You tried to quit a user (%s) twice. Did your module call QuitUser twice?", user->nick.c_str());
+ return;
+ }
+
ServerInstance->Logs->Log("USERS", DEBUG,"QuitUser: %s '%s'", user->nick.c_str(), quitreason.c_str());
user->Write("ERROR :Closing link (%s@%s) [%s]", user->ident.c_str(), user->host.c_str(), *operreason ? operreason : quitreason.c_str());
+ user->quitting = true;
user->quietquit = false;
user->quitmsg = quitreason;