Просмотр исходного кода

* Fixed ignores not being used. (#147) (Breaks a fix to not display msgs after added to ignore for floods)

svn: 2346
Bryan Drewery 21 лет назад
Родитель
Сommit
a2d4717194
2 измененных файлов с 7 добавлено и 6 удалено
  1. 1 0
      doc/UPDATES
  2. 6 6
      src/mod/server.mod/servmsg.c

+ 1 - 0
doc/UPDATES

@@ -21,6 +21,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed being able to 'chsecpass' a bot.
 * Fixed cmd_chsecpass to use whois_access() (#120)
 * Added code to eat zombie processes minutely (shouldn't interfere with anything)
+* Fixed ignores not being used. (#147) (Breaks a fix to not display msgs after added to ignore for floods)
 
 1.2.6
 * (REVERTED FROM 1.2.3) Disabled all memory allocations after a segfault (Fixes CPU spinning)

+ 6 - 6
src/mod/server.mod/servmsg.c

@@ -486,7 +486,7 @@ static int gotmsg(char *from, char *msg)
       ctcp = strcpy(ctcpbuf, p1);
       strcpy(p1 - 1, p + 1);
       if (!ignoring)
-        ignoring = detect_flood(nick, uhost, from, strncmp(ctcp, "ACTION ", 7) ? FLOOD_CTCP : FLOOD_PRIVMSG);
+        detect_flood(nick, uhost, from, strncmp(ctcp, "ACTION ", 7) ? FLOOD_CTCP : FLOOD_PRIVMSG);
       /* Respond to the first answer_ctcp */
       p = strchr(msg, 1);
       if (ctcp_count < answer_ctcp) {
@@ -564,8 +564,8 @@ static int gotmsg(char *from, char *msg)
   if (msg[0]) {
     if ((to[0] == '$') || (strchr(to, '.') != NULL)) {
       /* Msg from oper */
-      ignoring = detect_flood(nick, uhost, from, FLOOD_PRIVMSG);
       if (!ignoring) {
+        detect_flood(nick, uhost, from, FLOOD_PRIVMSG);
 	/* Do not interpret as command */
 	putlog(LOG_MSGS | LOG_SERV, "*", "[%s!%s to %s] %s",nick, uhost, to, msg);
       }
@@ -574,7 +574,7 @@ static int gotmsg(char *from, char *msg)
       Auth *auth = Auth::Find(uhost);
 
       if (!auth)
-        ignoring = detect_flood(nick, uhost, from, FLOOD_PRIVMSG);
+        detect_flood(nick, uhost, from, FLOOD_PRIVMSG);
       my_code = newsplit(&msg);
       rmspace(msg);
       /* is it a cmd? */
@@ -654,7 +654,7 @@ static int gotnotice(char *from, char *msg)
       ctcp = strcpy(ctcpbuf, p1);
       strcpy(p1 - 1, p + 1);
       if (!ignoring)
-	ignoring = detect_flood(nick, uhost, from, FLOOD_CTCP);
+	detect_flood(nick, uhost, from, FLOOD_CTCP);
       p = strchr(ctcpmsg, 1);
       if (ctcp[0] != ' ') {
 	char *code = newsplit(&ctcp);
@@ -678,7 +678,7 @@ static int gotnotice(char *from, char *msg)
   free(ptr);
   if (msg[0]) {
     if (((to[0] == '$') || strchr(to, '.')) && !ignoring) {
-      ignoring = detect_flood(nick, uhost, from, FLOOD_NOTICE);
+      detect_flood(nick, uhost, from, FLOOD_NOTICE);
       putlog(LOG_MSGS | LOG_SERV, "*", "-%s (%s) to %s- %s", nick, uhost, to, msg);
     } else {
       /* Server notice? */
@@ -691,7 +691,7 @@ static int gotnotice(char *from, char *msg)
 	if (strncmp(msg, "Highest connection count:", 25))
 	  putlog(LOG_SERV, "*", "-NOTICE- %s", msg);
       } else {
-        ignoring = detect_flood(nick, uhost, from, FLOOD_NOTICE);
+        detect_flood(nick, uhost, from, FLOOD_NOTICE);
         u = get_user_by_host(from);
         if (!ignoring)
   	      putlog(LOG_MSGS, "*", "-%s (%s)- %s", nick, uhost, msg);