diff options
Diffstat (limited to 'src/commands.cpp')
-rw-r--r-- | src/commands.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 1a5eb81d0..258fb635c 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -83,6 +83,7 @@ extern whowas_hash whowas; extern command_table cmdlist; extern std::vector<userrec*> all_opers; +extern std::vector<userrec*> local_users; // This table references users by file descriptor. // its an array to make it VERY fast, as all lookups are referenced @@ -912,6 +913,11 @@ void handle_quit(char **parameters, int pcnt, userrec *user) if (user->fd > -1) { SE->DelFd(user->fd); + if (find(local_users.begin(),local_users.end(),user) != local_users.end()) + { + log(DEBUG,"Delete local user"); + local_users.erase(find(local_users.begin(),local_users.end(),user)); + } user->CloseSocket(); } |