From 98d01b9693acec9173851bfc1eb8e4f9633d0916 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Sat, 20 Nov 2004 15:00:57 +0000 Subject: [PATCH] Ignore redundant CREATEs (fixes bug #1037963). git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1269 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 5 +++++ ircd/m_create.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 471b3ee..09eae74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-11-20 Michael Poole + + * ircd/m_create.c (ms_create): Complain if a user tries to CREATE + a channel they are already in, but do not add them again. + 2004-11-09 Michael Poole * include/res.h (init_resolver): Delete, and initialize lazily. diff --git a/ircd/m_create.c b/ircd/m_create.c index b66b4c8..96cf3af 100644 --- a/ircd/m_create.c +++ b/ircd/m_create.c @@ -158,7 +158,11 @@ int ms_create(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) if ((chptr = FindChannel(name))) { - name = chptr->chname; + /* Is the remote server confused? */ + if (find_member_link(chptr, sptr)) { + protocol_violation(sptr, "%s tried to CREATE a channel already joined", cli_name(sptr)); + continue; + } /* Check if we need to bounce a mode */ if (TStime() - chanTS > TS_LAG_TIME || -- 2.20.1