Author: Kev <klmitch@mit.edu>
[ircu2.10.12-pk.git] / ircd / m_join.c
index 2a58a37fa1aa423432400203e614bafee6982b36..091562bfca904fa04acde883fbef782122bd2ee3 100644 (file)
@@ -60,10 +60,10 @@ last0(struct Client *cptr, struct Client *sptr, char *chanlist)
   int join0 = 0;
 
   for (p = chanlist; p[0]; p++) /* find last "JOIN 0" */
-    if (p[0] == '0' && (p[1] == ',' || p[1] == '\0' || !IsChannelChar(p[1]))) {
-      if (*++p == ',')
+    if (p[0] == '0' && (p[1] == ',' || p[1] == '\0')) {
+      if (p[1] == ',')
         p++;
-      chanlist = p;
+      chanlist = p + 1;
       join0 = 1;
     } else {
       while (p[0] != ',' && p[0] != '\0') /* skip past channel name */