X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=db23d5672219799857e99d67e84cdc1d7d6fff4c;hb=9d58c0986bfc4801a8d6388947f100317470bb5f;hp=82d11eb34ecf6dcd3df2481f945cb86768ef5ac5;hpb=a14e9ff3d194001952c2ed9a296c88840908bb46;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 82d11eb34..db23d5672 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1715,8 +1715,6 @@ ConnectClass* User::SetClass(const std::string &explicit_name) } else { - ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Total classes: %d", ServerInstance->Config->Classes.size()); - for (ClassVector::iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); i++) { ConnectClass* c = *i; @@ -1730,6 +1728,13 @@ ConnectClass* User::SetClass(const std::string &explicit_name) ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "DENY %s %d %s", c->GetHost().c_str(), c->GetPort(), c->GetName().c_str()); } + /* if it's disabled, we can't match this one. */ + if (c->GetDisabled()) + { + ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Class disabled"); + continue; + } + /* check if host matches.. */ if (((!match(this->GetIPString(),c->GetHost(),true)) && (!match(this->host,c->GetHost())))) { @@ -1747,13 +1752,6 @@ ConnectClass* User::SetClass(const std::string &explicit_name) continue; } - /* if it's disabled, we can't match this one. */ - if (c->GetDisabled()) - { - ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Class disabled"); - continue; - } - /* if it requires a port ... */ if (c->GetPort()) {