]> jfr.im git - irc/quakenet/newserv.git/blobdiff - trojanscan/trojanscan.c
gline playground
[irc/quakenet/newserv.git] / trojanscan / trojanscan.c
index 34468ebf7ca5f3f1c8313ecbe9ce2ea664880494..49ef3734c79a0ac925716bc511a0a8ef5a59d6c0 100644 (file)
@@ -777,9 +777,9 @@ void trojanscan_privmsg_chan_or_nick(channel *cp, nick *np, char *message, ...)
   va_end(va);
   
   if (cp) {
-    sendmessagetochannel(trojanscan_nick, cp, buf);
+    sendmessagetochannel(trojanscan_nick, cp, "%s", buf);
   } else {
-    sendmessagetouser(trojanscan_nick, np, buf);
+    sendmessagetouser(trojanscan_nick, np, "%s", buf);
   }
 
 }
@@ -1998,16 +1998,14 @@ static int trojanscan_hostcount(nick *sender, int hostmode, char *mask, int mask
   nick *np = NULL; /* sigh at warnings */
 
   if(hostmode)
-    for (j=0;j<NICKHASHSIZE;j++)
-      for (np=nicktable[j];np;np=np->next)
-        if (np->ipnode==sender->ipnode)
-          usercount++;
+    usercount = sender->ipnode->usercount;
 
   if(usercount > TROJANSCAN_MAX_HOST_GLINE) {
     hostmode = 0;
     usercount = 0;
   }
 
+  /* should really go through the ipnode I guess */
   if(!hostmode)
     for (j=0;j<NICKHASHSIZE;j++)
       for (np=nicktable[j];np;np=np->next)