Przeglądaj źródła

* The WHO reply doesn't always have a : for hops. Namely the WHOX (354) response is missing it

Bryan Drewery 16 lat temu
rodzic
commit
bdb1bf46b1
1 zmienionych plików z 4 dodań i 6 usunięć
  1. 4 6
      src/mod/irc.mod/chan.c

+ 4 - 6
src/mod/irc.mod/chan.c

@@ -1969,10 +1969,9 @@ static int got352(char *from, char *msg)
     nick = newsplit(&msg);	/* Grab the nick */
     flags = newsplit(&msg);	/* Grab the flags */
     hops = newsplit(&msg);	/* grab server hops */
-    if (hops[0] == ':') {
+    if (hops[0] == ':')
       ++hops;			/* Skip the : */
-      real_hops = atoi(hops);
-    }
+    real_hops = atoi(hops);
     realname = newsplit(&msg);	/* realname/gecos */
     got352or4(chan, user, host, nick, flags, real_hops, realname, NULL);
   }
@@ -1999,10 +1998,9 @@ static int got354(char *from, char *msg)
 	nick = newsplit(&msg);	/* Grab the nick */
 	flags = newsplit(&msg);	/* Grab the flags */
         hops = newsplit(&msg);  /* server hops */
-        if (hops[0] == ':') {
+        if (hops[0] == ':')
           ++hops;			/* Skip the : */
-          real_hops = atoi(hops);
-        }
+        real_hops = atoi(hops);
         realname = newsplit(&msg); /* realname/gecos */
 	got352or4(chan, user, host, nick, flags, real_hops, realname, ip);
       }