]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Little change to the G-line logic in T
authorCruicky <redacted>
Sat, 4 Feb 2006 19:17:00 +0000 (19:17 +0000)
committerCruicky <redacted>
Sat, 4 Feb 2006 19:17:00 +0000 (19:17 +0000)
trojanscan/trojanscan.c
trojanscan/trojanscan.h

index 764bdfbe1035f6e861d749ea502b40f7337cd352..42fbc6518ad573c2415959bf3751fa9ca80e849a 100644 (file)
@@ -1733,13 +1733,11 @@ void trojanscan_clonehandlemessages(nick *target, int messagetype, void **args)
             if (worm->monitor) {
               glining = 0;
               usercount = -1;
-            } else if (worm->glinehost) {
+            } else if (worm->glinehost && (hp->clonecount <= TROJANSCAN_MAX_HOST_GLINE)) {
               snprintf(glinemask, sizeof(glinemask) - 1, "*@%s", trojanscan_iptostr(ip, sizeof(ip) - 1, sender->ipaddress));
               usercount = hp->clonecount;
             }
-
-            /* if the host is >maxusers then it's a trusted host and we can gline by ident */
-            if (worm->glineuser || (worm->glinehost && (usercount > trojanscan_maxusers))) {
+            else if (worm->glineuser || (worm->glinehost && hp->clonecount > TROJANSCAN_MAX_HOST_GLINE)) {
               userbit = sender->ident;
               if(userbit[0] == '~')
                 userbit++;
index 22adc303e81876842de7d7463c1a57a91bd63fa6..ef369455b2d2d3cc71a7713cb5e95c81822f5155 100644 (file)
@@ -20,6 +20,8 @@
 
 #define TROJANSCAN_VERSION "2.57"
 
+#define TROJANSCAN_MAX_HOST_GLINE   5
+
 #define TROJANSCAN_CLONE_MAX        150
 #define TROJANSCAN_WATCHCLONE_MAX   100
 #define TROJANSCAN_CLONE_TOTAL TROJANSCAN_CLONE_MAX + TROJANSCAN_WATCHCLONE_MAX