]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Attempt to fix some of the mess on N, T now uses the node user count for *@glines
authorChris Porter <redacted>
Thu, 11 Sep 2008 00:02:52 +0000 (00:02 +0000)
committerChris Porter <redacted>
Thu, 11 Sep 2008 00:02:52 +0000 (00:02 +0000)
trojanscan/trojanscan.c

index 34468ebf7ca5f3f1c8313ecbe9ce2ea664880494..21d2849576eef63931c1f4442f58cbb61295c1db 100644 (file)
@@ -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)