diff options
-rw-r--r-- | src/usermanager.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 5891b42f0..71ccd09da 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -88,6 +88,13 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs this->local_users.push_front(New); + if (!SocketEngine::AddFd(eh, FD_WANT_FAST_READ | FD_WANT_EDGE_WRITE)) + { + ServerInstance->Logs->Log("USERS", LOG_DEBUG, "Internal error on new connection"); + this->QuitUser(New, "Internal error handling connection"); + return; + } + if (this->local_users.size() > ServerInstance->Config->SoftLimit) { ServerInstance->SNO->WriteToSnoMask('a', "Warning: softlimit value has been reached: %d clients", ServerInstance->Config->SoftLimit); @@ -147,13 +154,6 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs } } - if (!SocketEngine::AddFd(eh, FD_WANT_FAST_READ | FD_WANT_EDGE_WRITE)) - { - ServerInstance->Logs->Log("USERS", LOG_DEBUG, "Internal error on new connection"); - this->QuitUser(New, "Internal error handling connection"); - return; - } - if (ServerInstance->Config->RawLog) New->WriteNotice("*** Raw I/O logging is enabled on this server. All messages, passwords, and commands are being recorded."); |