[IRCServices] small akill bug

Lloyd Williams binary_frog at chatcircuit.com
Sat Dec 1 16:02:00 PST 2001


cancel_akill() modifies the string that is passed to it, if 
WallAkillExpire is enabled, the printed string contains only the 
username part of the mask

a simple fix:

--- ircservices-4.5.33-orig/akill.c	Fri Nov 23 11:10:35 2001
+++ ircservices-4.5.33-fixed/akill.c	Sat Dec  1 13:54:29 2001
@@ -274,9 +274,10 @@
   
/*************************************************************************/
  -static void cancel_akill(char *mask)
+static void cancel_akill(char *mask_)
  {
  #if defined(IRC_UNREAL) || defined(IRC_DALNET)
+    char *mask = strdup(mask_);
      char *s = strchr(mask, '@');
      if (s) {
  	*s++ = 0;
@@ -287,6 +288,7 @@
  	send_cmd(ServerName, "RAKILL %s %s", s, mask);
  # endif
      }
+    free(mask);
  #endif
  }