소스 검색

Only bail out of offense check if there's no color check as well

Bryan Drewery 14 년 전
부모
커밋
67bb61d730
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      src/mod/irc.mod/irc.c

+ 3 - 4
src/mod/irc.mod/irc.c

@@ -146,12 +146,11 @@ detect_offense(memberlist* m, struct chanset_t *chan, char *msg)
       ++msg_check;
     }
 
-    if (!tot) {
-      return 0;
-    }
-
     if (tot >= 30) {
       hit_check = tot/5; //check in-between for hits to save waste of cpu
+    } else if (!tot && !chan->colorlimit) {
+      // Nothing to do, bail out
+      return 0;
     }
   }