summaryrefslogtreecommitdiff
path: root/modules/protocol/ratbox.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/ratbox.cpp
parent50f7429fda7cb3ffd8c34abb0a13f3dcc929f2ed (diff)
Remove 2 day xline cap
Diffstat (limited to 'modules/protocol/ratbox.cpp')
-rw-r--r--modules/protocol/ratbox.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index 4541419b7..f8a6d979c 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -46,12 +46,11 @@ void ratbox::senders::Logout::Send(User *u)
void ratbox::senders::SQLine::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;
#warning "find introduced"
// Uplink::Send(FindIntroduced(), "ENCAP", "*", "RESV", timeleft, x->GetMask(), 0, x->GetReason());
}