diff options
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r-- | src/usermanager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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; |