diff options
Diffstat (limited to 'modules/protocol/ngircd.cpp')
-rw-r--r-- | modules/protocol/ngircd.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index bbb594ff8..1c95b3942 100644 --- a/modules/protocol/ngircd.cpp +++ b/modules/protocol/ngircd.cpp @@ -26,10 +26,11 @@ void ngircd::senders::Akill::Send(User* u, XLine* x) { - // Calculate the time left before this would expire, capping it at 2 days - time_t timeleft = x->GetExpires() - Anope::CurTime; - if (timeleft > 172800 || !x->GetExpires()) - timeleft = 172800; + if (x->IsExpired()) + return; + + // Calculate the time left before this would expire + time_t timeleft = x->GetExpires() > 0 ? x->GetExpires() - Anope::CurTime : 0; Uplink::Send(Me, "GLINE", x->GetMask(), timeleft, x->GetReason() + " (" + x->GetBy() + ")"); } |