]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/usermanager.cpp
Include explicit parameter list in ProtocolInterface::SendMode
[user/henk/code/inspircd.git] / src / usermanager.cpp
index 521dcec417d18765f6943257f56f04e560c8aacf..f8b1f0de257cfe4d4b4d53f8c911c810460ac055 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -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->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;
 
@@ -268,7 +275,7 @@ void UserManager::RemoveCloneCounts(User *user)
                        local_clones.erase(x);
                }
        }
-       
+
        clonemap::iterator y = global_clones.find(user->GetCIDRMask(range));
        if (y != global_clones.end())
        {
@@ -480,6 +487,3 @@ int UserManager::ModeCount(const char mode)
        else
                return 0;
 }
-
-
-