diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/users.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/users.cpp b/src/users.cpp index 82d11eb34..60d0f65eb 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1715,7 +1715,7 @@ ConnectClass* User::SetClass(const std::string &explicit_name) } else { - ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Total classes: %d", ServerInstance->Config->Classes.size()); + ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Total classes: %lu", ServerInstance->Config->Classes.size()); for (ClassVector::iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); i++) { @@ -1730,6 +1730,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 +1754,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()) { |