From 87ddd0bb36a4a5d2ada382222598b8da1a7e9a46 Mon Sep 17 00:00:00 2001 From: "Kevin L. Mitchell" Date: Fri, 16 Sep 2005 14:12:05 +0000 Subject: [PATCH] Author: Kev 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 | 7 +++++++ ircd/m_join.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 989ed82..7da8ce5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-09-16 Kevin L. Mitchell + + * 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 * doc/readme.cvs: Document the branching scheme for 2.10.12. diff --git a/ircd/m_join.c b/ircd/m_join.c index 2a58a37..091562b 100644 --- a/ircd/m_join.c +++ b/ircd/m_join.c @@ -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 */ -- 2.20.1