]> jfr.im git - irc/quakenet/newserv.git/blobdiff - trojanscan/trojanscan.c
newsearch: (server) shouldn't return NULL.
[irc/quakenet/newserv.git] / trojanscan / trojanscan.c
index 867c0f60a75f8edf4c04b8b263a05d65f1e96278..bfcf02becbb63dd172431004ad87a5b6b3e66567 100644 (file)
@@ -487,7 +487,7 @@ int trojanscan_strip_codes(char *buf, size_t max, char *original) {
 struct trojanscan_worms *trojanscan_find_worm_by_id(int id) {
   int i;
   for(i=0;i<trojanscan_database.total_worms;i++)
-    if ((trojanscan_database.worms[i].id == id))
+    if (trojanscan_database.worms[i].id == id)
       return &trojanscan_database.worms[i];
   return NULL;
 }
@@ -1930,7 +1930,7 @@ void trojanscan_clonehandlemessages(nick *target, int messagetype, void **args)
                 trojanscan_chans[j].watch_clone = NULL;
           } else {
             for(rp=trojanscan_realchanlist;rp;rp=rp->next)
-              if ((rp->clone == &(trojanscan_swarm[i])))
+              if (rp->clone == &(trojanscan_swarm[i]))
                 rp->donotpart = 1;
           }
           derefnode(iptree, trojanscan_swarm[i].fakeipnode);
@@ -2022,7 +2022,7 @@ void trojanscan_phrasematch(channel *chp, nick *sender, trojanscan_phrases *phra
   } else if(worm->glinehost || worm->glineuser) {
     glining = 1;
 
-    usercount = glinebynick(sender, 0, NULL, GLINE_SIMULATE);
+    usercount = glinebynick(sender, 0, NULL, GLINE_SIMULATE, "trojanscan");
   }
   
   if (!usercount) {
@@ -2070,7 +2070,7 @@ void trojanscan_phrasematch(channel *chp, nick *sender, trojanscan_phrases *phra
     trojanscan_database.glines++;
     
     snprintf(reason, sizeof(reason), "You (%s!%s@%s) are infected with a trojan (%s/%d), see %s%d for details - banned for %d hours", sender->nick, sender->ident, sender->host->name->content, worm->name->content, phrase->id, TROJANSCAN_URL_PREFIX, worm->id, glinetime);
-    glinebynick(sender, glinetime * 3600, reason, 0);
+    glinebynick(sender, glinetime * 3600, reason, 0, "trojanscan");
 
     trojanscan_mainchanmsg("g: *!%s t: %c u: %s!%s@%s%s%s c: %d w: %s%s p: %d f: %d%s%s", glinemask, messagetype, sender->nick, sender->ident, sender->host->name->content, messagetype=='N'||messagetype=='M'||messagetype=='P'?" #: ":"", messagetype=='N'||messagetype=='M'||messagetype=='P'?chp->index->name->content:"", usercount, worm->name->content, worm->epidemic?"(E)":"", phrase->id, frequency, matchbuf[0]?" --: ":"", matchbuf[0]?matchbuf:"");
   }