mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-11 19:49:02 -04:00
Call IOHookProviders after the socket has been added to the SocketEngine in UserManager::AddUser()
This commit is contained in:
parent
0ca92e252e
commit
fb7acf3bf7
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user