]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/usermanager.cpp
Change a few bits to use std::list instead of std::vector.
[user/henk/code/inspircd.git] / src / usermanager.cpp
index 521dcec417d18765f6943257f56f04e560c8aacf..58c9b4e3e952a9f745e3aa7478d81dc420446cfa 100644 (file)
@@ -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;