summaryrefslogtreecommitdiff
path: root/modules/protocol/unreal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/protocol/unreal.cpp')
-rw-r--r--modules/protocol/unreal.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/modules/protocol/unreal.cpp b/modules/protocol/unreal.cpp
index bf4a6a8a8..0ccbc4008 100644
--- a/modules/protocol/unreal.cpp
+++ b/modules/protocol/unreal.cpp
@@ -73,11 +73,10 @@ void unreal::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;
- Uplink::Send("TKL", "+", "G", x->GetUser(), x->GetHost(), x->GetBy(), Anope::CurTime + timeleft, x->GetCreated(), x->GetReason());
+ if (x->IsExpired())
+ return;
+
+ Uplink::Send("TKL", "+", "G", x->GetUser(), x->GetHost(), x->GetBy(), x->GetExpires(), x->GetCreated(), x->GetReason());
}
void unreal::senders::AkillDel::Send(XLine* x)
@@ -209,11 +208,10 @@ void unreal::senders::SQLineDel::Send(XLine* x)
void unreal::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;
- Uplink::Send("TKL", "+", "Z", "*", x->GetHost(), x->GetBy(), Anope::CurTime + timeleft, x->GetCreated(), x->GetReason());
+ if (x->IsExpired())
+ return;
+
+ Uplink::Send("TKL", "+", "Z", "*", x->GetHost(), x->GetBy(), x->GetExpires(), x->GetCreated(), x->GetReason());
}
void unreal::senders::SZLineDel::Send(XLine* x)