X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusermanager.cpp;h=ecbd683b77b181210896504ee7e669db084dd912;hb=3f971b447fae258a92f2cc6645497cce93f1c04e;hp=6a23ad79517efb043899e5b865a2b92df6303a96;hpb=2db77cda56947d4ee0f913c8082f6607855ca713;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 6a23ad795..ecbd683b7 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -108,7 +108,7 @@ void UserManager::AddClient(InspIRCd* Instance, int socket, int port, bool iscac this->local_users.push_back(New); - if ((this->local_users.size() > Instance->Config->SoftLimit) || (this->local_users.size() >= MAXCLIENTS)) + if ((this->local_users.size() > Instance->Config->SoftLimit) || (this->local_users.size() >= (unsigned int)Instance->SE->GetMaxFds())) { Instance->SNO->WriteToSnoMask('A', "Warning: softlimit value has been reached: %d clients", Instance->Config->SoftLimit); User::QuitUser(Instance, New,"No more connections allowed"); @@ -125,13 +125,12 @@ void UserManager::AddClient(InspIRCd* Instance, int socket, int port, bool iscac * which for the time being is a physical impossibility (even the largest networks dont have more * than about 10,000 users on ONE server!) */ -#ifndef WINDOWS if (socket >= Instance->SE->GetMaxFds()) { User::QuitUser(Instance, New, "Server is full"); return; } -#endif + /* * 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