Explorar el Código

Properly ignore actual host (#63)

Bryan Drewery hace 13 años
padre
commit
173befa8b4
Se han modificado 1 ficheros con 7 adiciones y 6 borrados
  1. 7 6
      src/mod/server.mod/servmsg.c

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

@@ -1918,10 +1918,7 @@ static int got465(char *from, char *msg)
 static int got718(char *from, char *msg)
 {
   char *nick = NULL, *uhost = NULL;
-  bool ignoring = match_ignore(from);
-
-  if (ignoring)
-    return 0;
+  char s[UHOSTLEN + 2] = "";
 
   newsplit(&msg);
   nick = newsplit(&msg);
@@ -1942,11 +1939,15 @@ static int got718(char *from, char *msg)
     uhost = newsplit(&msg);
   fixcolon(msg);
 
+  simple_snprintf(s, sizeof(s), "%s!%s", nick, uhost);
+
+  if (match_ignore(s)) {
+    return 0;
+  }
+
   if (ischanhub()) {
-    char s[UHOSTLEN + 2] = "";
     struct userrec *u = NULL;
 
-    simple_snprintf(s, sizeof(s), "%s!%s", nick, uhost);
     u = get_user_by_host(s);
     if (u) {
       struct flag_record fr = { FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0 };