X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=784783086ca21f8bc3df288dbca0d8478057fbe7;hb=30b7a1bf7fb0b422a6fd674f0cce95b3b0f92673;hp=2b6e00e0e4ec79746dbce34ea2b672311d977767;hpb=0d3ecb964292600ec1ce6ee1cef83f72185a8bcc;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 2b6e00e0e..784783086 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1830,6 +1830,9 @@ ConnectClass* User::SetClass(const std::string &explicit_name) { ConnectClass* c = *i; + if (c->GetDisabled()) + continue; // can't possibly match, removed from conf + if (explicit_name == c->GetName()) { ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Explicitly set to %s", explicit_name.c_str()); @@ -1852,6 +1855,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 (!InspIRCd::MatchCIDR(this->GetIPString(), c->GetHost(), NULL) && !InspIRCd::MatchCIDR(this->host, c->GetHost(), NULL))