Skip to content

Commit

Permalink
Fix recursion in QuitUser
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10809 e03df62e-2008-0410-955e-edbf42e46eb7
  • Loading branch information
rburchell committed Nov 17, 2008
1 parent 4abc2ff commit 125a744
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/cull_list.cpp
Expand Up @@ -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);
}

Expand Down
7 changes: 7 additions & 0 deletions src/usermanager.cpp
Expand Up @@ -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;

Expand Down

0 comments on commit 125a744

Please sign in to comment.