diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-14 00:31:44 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-14 00:31:44 +0000 |
commit | 4498f1abd163b140efcbbd9e75173665c9b1c29f (patch) | |
tree | fe2c6b8f1abe72ac96e49a5ba2c1fb72bc5de30d /src/usermanager.cpp | |
parent | 2552786a2fbed628e7d51a6b8e177981b1ff8d40 (diff) |
m_dnsbl updates
Prevent user registration until dnsbl lookups are complete
Allow DNSBLs to be checked using <connect:dnsbl> (MARK type)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12454 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r-- | src/usermanager.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
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 |