1 From acc24a7f4488f6ef0fb240a76766db4220b62d53 Mon Sep 17 00:00:00 2001
2 From: Alexander Barton <alex@barton.de>
3 Date: Sun, 22 Jan 2012 19:05:28 +0100
4 Subject: [PATCH 14/16] ngircd: set/unset GLINE's on AKILL commands
7 modules/protocol/ngircd.cpp | 10 ++++++++--
8 1 files changed, 8 insertions(+), 2 deletions(-)
10 diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
11 index 024c61d..3bc3812 100644
12 --- a/modules/protocol/ngircd.cpp
13 +++ b/modules/protocol/ngircd.cpp
14 @@ -48,10 +48,16 @@ class ngIRCdProto : public IRCDProto
16 void SendAkill(User *u, const XLine *x)
18 - // TODO: ADD SOME CODE
19 + // Calculate the time left before this would expire, capping it at 2 days
20 + time_t timeleft = x->Expires - Anope::CurTime;
21 + if (timeleft > 172800 || !x->Expires)
23 + UplinkSocket::Message(Config->ServerName) << "GLINE " << x->Mask << " " << timeleft << " :" << x->Reason << " (" << x->By << ")";
26 - void SendAkillDel(const XLine*) { }
27 + void SendAkillDel(const XLine *x) {
28 + UplinkSocket::Message(Config->ServerName) << "GLINE " << x->Mask;
31 void SendGlobopsInternal(const BotInfo *source, const Anope::string &buf)