Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Fri, 16 Sep 2005 14:12:05 +0000 (14:12 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Fri, 16 Sep 2005 14:12:05 +0000 (14:12 +0000)
Log message:

Fix bug #1291029 (protocol violations caused by remote users performing
/join 0)

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1489 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/m_join.c

index 989ed8226208d2f541adc7ff4ddcb67cf02d7f1f..7da8ce5bc85d733775856cb3aa0134d4e1f17253 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-09-16  Kevin L. Mitchell  <klmitch@mit.edu>
+
+       * ircd/m_join.c (last0): fix problem leading to protocol
+       violations on certain combinations of /join 0 from remote servers
+       (probably from local users, too) [bug #1291029]; remove redundant
+       !IsChannelChar() check
+
 2005-09-14  Michael Poole <mdpoole@troilus.org>
 
        * doc/readme.cvs: Document the branching scheme for 2.10.12.
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 */