From ba47c49a6c0f0c5c7fc84b6638dc1234e1589c71 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 15 Dec 2005 19:46:13 +0000 Subject: Added 'local users' vector git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2489 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/commands.cpp') 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 all_opers; +extern std::vector 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(); } -- cgit v1.2.3