diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-18 17:25:29 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-05-18 17:25:29 +0000 |
commit | d2a1d1df4323c95e926618d1839833cbc12f60ab (patch) | |
tree | 0424ee63aea6aa6ab12eb6be9de2f93c476674b9 | |
parent | 9e59e5e906246e928b0d90bc8ff25583b0b71a8f (diff) |
Debug logging for connect class match failure
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9733 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/users.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/users.cpp b/src/users.cpp index fd99f12b7..afd26b1f8 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1695,6 +1695,8 @@ ConnectClass* User::SetClass(const std::string &explicit_name) if (!IS_LOCAL(this)) return NULL; + ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Setting connect class for UID %s", this->uuid); + if (!explicit_name.empty()) { for (ClassVector::iterator i = ServerInstance->Config->Classes.begin(); i != ServerInstance->Config->Classes.end(); i++) @@ -1706,6 +1708,7 @@ ConnectClass* User::SetClass(const std::string &explicit_name) if (explicit_name == c->GetName()) { + ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Explicitly set to %s", explicit_name.c_str()); found = c; } } @@ -1719,6 +1722,7 @@ ConnectClass* User::SetClass(const std::string &explicit_name) /* check if host matches.. */ if (((!match(this->GetIPString(),c->GetHost().c_str(),true)) && (!match(this->host,c->GetHost().c_str())))) { + ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "No host match (for %s)", c->GetHost().c_str()); continue; } @@ -1728,20 +1732,26 @@ ConnectClass* User::SetClass(const std::string &explicit_name) */ if (c->limit && (c->RefCount + 1 >= c->limit)) { - ServerInstance->Logs->Log("USERS", DEBUG, "OOPS: Connect class limit (%lu) hit, denying", c->limit); + ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "OOPS: Connect class limit (%lu) hit, denying", c->limit); 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()) { + ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Requires port"); + /* and our port doesn't match, fail. */ if (this->GetPort() != c->GetPort()) { + ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Port match failed"); continue; } } |