1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 11:26:36 +02:00

Set proper expirys on ZLines if the IRCd supports it

This commit is contained in:
Adam
2011-11-05 00:11:49 -04:00
parent b3194a10c5
commit 5f0b9338dc
5 changed files with 36 additions and 8 deletions
+5 -1
View File
@@ -146,8 +146,12 @@ class PlexusProto : public IRCDProto
void SendAkill(User *, const XLine *x)
{
// Calculate the time left before this would expire, capping it at 2 days
time_t timeleft = x->Expires - Anope::CurTime;
if (timeleft > 172800 || !x->Expires)
timeleft = 172800;
BotInfo *bi = findbot(Config->OperServ);
send_cmd(bi ? bi->GetUID() : Config->OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(x->Expires - Anope::CurTime), x->GetUser().c_str(), x->GetHost().c_str(), x->Reason.c_str());
send_cmd(bi ? bi->GetUID() : Config->OperServ, "KLINE * %ld %s %s :%s", static_cast<long>(timeleft), x->GetUser().c_str(), x->GetHost().c_str(), x->Reason.c_str());
}
void SendSVSKillInternal(const BotInfo *source, const User *user, const Anope::string &buf)