]> jfr.im git - irc/quakenet/newserv.git/blobdiff - chanserv/authtracker/authtracker_hooks.c
Fix various warnings.
[irc/quakenet/newserv.git] / chanserv / authtracker / authtracker_hooks.c
index 411a04c1d8ef11682b45d4cb13ce2a2de37c89fa..536e1db0f653620cace9739796fcbd9a938914c3 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <time.h>
 #include <string.h>
+#include <stdio.h>
 
 #define NTERFACER_AUTH "nterfacer"
 
@@ -47,6 +48,7 @@ void at_handlequitorkill(int hooknum, void *arg) {
   nick *np=args[0];
   char *reason=args[1];
   char *rreason;
+  char resbuf[512];
   unsigned long userid;
   
   /* Ignore unauthed users, or those with no accountts */
@@ -57,8 +59,10 @@ void at_handlequitorkill(int hooknum, void *arg) {
   at_lastauthts=np->accountts;
   at_lastnum=np->numeric;
 
-  if (hooknum==HOOK_NICK_KILL && (rreason=strchr(reason,'@')))
-    reason=rreason;
+  if (hooknum==HOOK_NICK_KILL && (rreason=strchr(reason,' '))) {
+    sprintf(resbuf,"Killed%s",rreason);
+    reason=resbuf;
+  }
   
   at_logquit(userid, np->accountts, time(NULL), reason);
 }