From 4498f1abd163b140efcbbd9e75173665c9b1c29f Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 14 Feb 2010 00:31:44 +0000 Subject: m_dnsbl updates Prevent user registration until dnsbl lookups are complete Allow DNSBLs to be checked using (MARK type) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12454 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/usermanager.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/usermanager.cpp') diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 9f5f8c937..588af9510 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -70,6 +70,17 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs ServerInstance->Users->AddLocalClone(New); ServerInstance->Users->AddGlobalClone(New); + this->local_users.push_back(New); + + if ((this->local_users.size() > ServerInstance->Config->SoftLimit) || (this->local_users.size() >= (unsigned int)ServerInstance->SE->GetMaxFds())) + { + ServerInstance->SNO->WriteToSnoMask('a', "Warning: softlimit value has been reached: %d clients", ServerInstance->Config->SoftLimit); + this->QuitUser(New,"No more connections allowed"); + return; + } + + FOREACH_MOD(I_OnUserInit,OnUserInit(New)); + /* * First class check. We do this again in FullConnect after DNS is done, and NICK/USER is recieved. * See my note down there for why this is required. DO NOT REMOVE. :) -- w00t @@ -82,15 +93,6 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs */ New->CheckClass(); - this->local_users.push_back(New); - - if ((this->local_users.size() > ServerInstance->Config->SoftLimit) || (this->local_users.size() >= (unsigned int)ServerInstance->SE->GetMaxFds())) - { - ServerInstance->SNO->WriteToSnoMask('a', "Warning: softlimit value has been reached: %d clients", ServerInstance->Config->SoftLimit); - this->QuitUser(New,"No more connections allowed"); - return; - } - /* * even with bancache, we still have to keep User::exempt current. * besides that, if we get a positive bancache hit, we still won't fuck -- cgit v1.3.1-10-gc9f91