mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-12 20:19:02 -04:00
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
This commit is contained in:
parent
9b3aaf3602
commit
efce1ce1e7
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user