diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-05 16:08:13 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-04-05 16:08:13 +0000 |
commit | efce1ce1e7b05610bf765cafa82cc7618ed4872a (patch) | |
tree | 8d164243fa52355b2e531b8c8e51280ba86ed42c | |
parent | 9b3aaf360202afd96ea968a3607fe535aab9fbc5 (diff) |
Fix bug (partially/accidentally) discovered by Bricker: if an XLine is not permanent, bancache should use the expiry time of the xline, not an arbitrary value
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9356 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/xline.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xline.cpp b/src/xline.cpp index 3f0ddbf2b..7ce6c3f0a 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -411,7 +411,10 @@ void XLine::DefaultApply(User* u, const std::string &line, bool bancache) if (bancache) { ServerInstance->Logs->Log("BANCACHE", DEBUG, std::string("BanCache: Adding positive hit (") + line + ") for " + u->GetIPString()); - ServerInstance->BanCache->AddHit(u->GetIPString(), this->type, line + "-Lined: " + this->reason); + if (this->duration > 0) + ServerInstance->BanCache->AddHit(u->GetIPString(), this->type, line + "-Lined: " + this->reason, this->duration); + else + ServerInstance->BanCache->AddHit(u->GetIPString(), this->type, line + "-Lined: " + this->reason); } } |