From efce1ce1e7b05610bf765cafa82cc7618ed4872a Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 5 Apr 2008 16:08:13 +0000 Subject: 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 --- src/xline.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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); } } -- cgit v1.2.3