X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusermanager.cpp;h=37f64b9d2904d6d3b701f12c67bca2f721316a1a;hb=1cf85908164d97dfa385c75b9f817905a8a75e78;hp=5dc410fffae7260e1fe13ff36f4443cff3c38471;hpb=f71e6bf9cb41811f18864f5d4eecb26e29d03f25;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 5dc410fff..37f64b9d2 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -22,7 +22,6 @@ #include "inspircd.h" #include "xline.h" -#include "bancache.h" #include "iohook.h" UserManager::UserManager() @@ -77,7 +76,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs this->local_users.push_front(New); - if ((this->local_users.size() > ServerInstance->Config->SoftLimit) || (this->local_users.size() >= (unsigned int)SocketEngine::GetMaxFds())) + if (this->local_users.size() > ServerInstance->Config->SoftLimit) { ServerInstance->SNO->WriteToSnoMask('a', "Warning: softlimit value has been reached: %d clients", ServerInstance->Config->SoftLimit); this->QuitUser(New,"No more connections allowed"); @@ -105,7 +104,8 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs */ New->exempt = (ServerInstance->XLines->MatchesLine("E",New) != NULL); - if (BanCacheHit *b = ServerInstance->BanCache->GetHit(New->GetIPString())) + BanCacheHit* const b = ServerInstance->BanCache.GetHit(New->GetIPString()); + if (b) { if (!b->Type.empty() && !New->exempt) {