diff options
author | Sadie Powell <sadie@witchery.services> | 2023-11-03 11:01:01 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2023-11-03 11:01:01 +0000 |
commit | 6e16e71fdaf4b725c8e4b3e89db5ed66d497a1a4 (patch) | |
tree | 3af3b4c9c5e034ad95dab5e3ee84b12b61ae75a2 /modules/protocol/inspircd.cpp | |
parent | 38d5b93e4af1babc7ec23a61aea8ba91b4fa9a57 (diff) |
Remove the two day X-line cap.
Diffstat (limited to 'modules/protocol/inspircd.cpp')
-rw-r--r-- | modules/protocol/inspircd.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/modules/protocol/inspircd.cpp b/modules/protocol/inspircd.cpp index 8e0581b13..d3628fb8f 100644 --- a/modules/protocol/inspircd.cpp +++ b/modules/protocol/inspircd.cpp @@ -207,10 +207,8 @@ class InspIRCdProto : public IRCDProto void SendAkill(User *u, XLine *x) override { - // 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; + // Calculate the time left before this would expire + time_t timeleft = x->expires ? x->expires - Anope::CurTime : x->expires; /* InspIRCd may support regex bans, if they do we can send this and forget about it * Mask is expected in format: 'n!u@h\sr' and spaces as '\s' @@ -349,10 +347,8 @@ class InspIRCdProto : public IRCDProto void SendSQLine(User *u, const XLine *x) override { - // 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; + // Calculate the time left before this would expire + time_t timeleft = x->expires ? x->expires - Anope::CurTime : x->expires; if (IRCD->CanSQLineChannel && (x->mask[0] == '#')) SendAddLine("CBAN", x->mask, timeleft, x->by, x->GetReason()); @@ -385,10 +381,9 @@ class InspIRCdProto : public IRCDProto void SendSZLine(User *u, const XLine *x) override { - // 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; + // Calculate the time left before this would expire + time_t timeleft = x->expires ? x->expires - Anope::CurTime : x->expires; + SendAddLine("Z", x->GetHost(), timeleft, x->by, x->GetReason()); } |