summaryrefslogtreecommitdiff
path: root/src/usermanager.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-08-24 12:18:27 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-08-24 12:18:27 +0200
commitfb7acf3bf7db27f61d9261a99862654dd3721a06 (patch)
treee62cdb141dd0137a38391586d46239d722f90f43 /src/usermanager.cpp
parent0ca92e252e5a22f3378f1a6d621fee878fcbf09d (diff)
Call IOHookProviders after the socket has been added to the SocketEngine in UserManager::AddUser()
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r--src/usermanager.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index 71ccd09da..15c86157b 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -71,14 +71,6 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
LocalUser* const New = new LocalUser(socket, client, server);
UserIOHandler* eh = &New->eh;
- // If this listener has an IO hook provider set then tell it about the connection
- for (ListenSocket::IOHookProvList::iterator i = via->iohookprovs.begin(); i != via->iohookprovs.end(); ++i)
- {
- ListenSocket::IOHookProvRef& iohookprovref = *i;
- if (iohookprovref)
- iohookprovref->OnAccept(eh, client, server);
- }
-
ServerInstance->Logs->Log("USERS", LOG_DEBUG, "New user fd: %d", socket);
this->unregistered_count++;
@@ -95,6 +87,14 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
return;
}
+ // If this listener has an IO hook provider set then tell it about the connection
+ for (ListenSocket::IOHookProvList::iterator i = via->iohookprovs.begin(); i != via->iohookprovs.end(); ++i)
+ {
+ ListenSocket::IOHookProvRef& iohookprovref = *i;
+ if (iohookprovref)
+ iohookprovref->OnAccept(eh, client, server);
+ }
+
if (this->local_users.size() > ServerInstance->Config->SoftLimit)
{
ServerInstance->SNO->WriteToSnoMask('a', "Warning: softlimit value has been reached: %d clients", ServerInstance->Config->SoftLimit);