1
0

0014-ngircd-set-unset-GLINE-s-on-AKILL-commands.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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
  5. ---
  6. modules/protocol/ngircd.cpp | 10 ++++++++--
  7. 1 files changed, 8 insertions(+), 2 deletions(-)
  8. diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
  9. index 024c61d..3bc3812 100644
  10. --- a/modules/protocol/ngircd.cpp
  11. +++ b/modules/protocol/ngircd.cpp
  12. @@ -48,10 +48,16 @@ class ngIRCdProto : public IRCDProto
  13. {
  14. void SendAkill(User *u, const XLine *x)
  15. {
  16. - // TODO: ADD SOME CODE
  17. + // Calculate the time left before this would expire, capping it at 2 days
  18. + time_t timeleft = x->Expires - Anope::CurTime;
  19. + if (timeleft > 172800 || !x->Expires)
  20. + timeleft = 172800;
  21. + UplinkSocket::Message(Config->ServerName) << "GLINE " << x->Mask << " " << timeleft << " :" << x->Reason << " (" << x->By << ")";
  22. }
  23. - void SendAkillDel(const XLine*) { }
  24. + void SendAkillDel(const XLine *x) {
  25. + UplinkSocket::Message(Config->ServerName) << "GLINE " << x->Mask;
  26. + }
  27. void SendGlobopsInternal(const BotInfo *source, const Anope::string &buf)
  28. {
  29. --
  30. 1.7.8.3