summaryrefslogtreecommitdiff
path: root/modules/protocol/hybrid.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-10-08 14:21:59 -0400
committerAdam <Adam@anope.org>2017-10-08 14:21:59 -0400
commit2cb0d9057bf1968d36168a76e25f4cf4d3b33fbf (patch)
tree0a6caccce7e5c4f4bed51964cb130b79d8219f1e /modules/protocol/hybrid.cpp
parent50f7429fda7cb3ffd8c34abb0a13f3dcc929f2ed (diff)
Remove 2 day xline cap
Diffstat (limited to 'modules/protocol/hybrid.cpp')
-rw-r--r--modules/protocol/hybrid.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp
index 76cad6fd3..d65a6c45f 100644
--- a/modules/protocol/hybrid.cpp
+++ b/modules/protocol/hybrid.cpp
@@ -62,12 +62,11 @@ void hybrid::senders::Akill::Send(User* u, XLine* x)
x->GetMask(), u->GetMask(), u->realname, old->GetMask());
}
- /* 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(Config->GetClient("OperServ"), "KLINE", timeleft, x->GetUser(), x->GetHost(), x->GetReason());
}
@@ -173,12 +172,11 @@ void hybrid::senders::SQLineDel::Send(XLine* x)
void hybrid::senders::SZLine::Send(User*, 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(Config->GetClient("OperServ"), "DLINE", "*", timeleft, x->GetHost(), x->GetReason());
}