diff options
| author | 2006-12-23 23:06:37 +0000 | |
|---|---|---|
| committer | 2006-12-23 23:06:37 +0000 | |
| commit | 74c8913f72e6d48c88a01155ef5fe5ca20cc2bb1 (patch) | |
| tree | 500634864eb634a89af543a3f8b6f663543f5589 /src/cmd_quit.cpp | |
| parent | Close logfile on rehash and reopen (it was only doing this on sighup for some... (diff) | |
Hash rehashing change
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6080 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_quit.cpp')
| -rw-r--r-- | src/cmd_quit.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cmd_quit.cpp b/src/cmd_quit.cpp index 0065987cf..db71bbdb1 100644 --- a/src/cmd_quit.cpp +++ b/src/cmd_quit.cpp @@ -26,7 +26,7 @@ extern "C" command_t* init_command(InspIRCd* Instance) CmdResult cmd_quit::Handle (const char** parameters, int pcnt, userrec *user) { - user_hash::iterator iter = ServerInstance->clientlist.find(user->nick); + user_hash::iterator iter = ServerInstance->clientlist->find(user->nick); char reason[MAXBUF]; std::string quitmsg = "Client exited"; @@ -82,17 +82,18 @@ CmdResult cmd_quit::Handle (const char** parameters, int pcnt, userrec *user) if (IS_LOCAL(user)) { ServerInstance->SE->DelFd(user); - if (find(ServerInstance->local_users.begin(),ServerInstance->local_users.end(),user) != ServerInstance->local_users.end()) + std::vector<userrec*>::iterator x = find(ServerInstance->local_users.begin(),ServerInstance->local_users.end(),user); + if (x != ServerInstance->local_users.end()) { ServerInstance->Log(DEBUG,"Delete local user"); - ServerInstance->local_users.erase(find(ServerInstance->local_users.begin(),ServerInstance->local_users.end(),user)); + ServerInstance->local_users.erase(x); } user->CloseSocket(); } - if (iter != ServerInstance->clientlist.end()) + if (iter != ServerInstance->clientlist->end()) { - ServerInstance->clientlist.erase(iter); + ServerInstance->clientlist->erase(iter); } if (user->registered == REG_ALL) { |
