summaryrefslogtreecommitdiff
path: root/modules/protocol/hybrid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/protocol/hybrid.cpp')
-rw-r--r--modules/protocol/hybrid.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/modules/protocol/hybrid.cpp b/modules/protocol/hybrid.cpp
index c554cc19d..465f3fd25 100644
--- a/modules/protocol/hybrid.cpp
+++ b/modules/protocol/hybrid.cpp
@@ -77,11 +77,8 @@ class HybridProto : public IRCDProto
void SendSZLine(User *, 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;
UplinkSocket::Message(Me) << "DLINE * " << timeleft << " " << x->GetHost() << " :" << x->GetReason();
}
@@ -162,11 +159,8 @@ class HybridProto : public IRCDProto
<< u->realname << " matches " << old->mask;
}
- /* 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;
UplinkSocket::Message(Me) << "KLINE * " << timeleft << " " << x->GetUser() << " " << x->GetHost() << " :" << x->GetReason();
}