Ignore redundant CREATEs (fixes bug #1037963).
authorMichael Poole <mdpoole@troilus.org>
Sat, 20 Nov 2004 15:00:57 +0000 (15:00 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sat, 20 Nov 2004 15:00:57 +0000 (15:00 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1269 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/m_create.c

index 471b3ee330f5b8d57ded4c3bc5a4b98bdda64ae8..09eae741f48dfbc57ff5f5fa7799673d818cac9c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-20  Michael Poole <mdpoole@troilus.org>
+
+       * 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 <mdpoole@troilus.org>
 
        * include/res.h (init_resolver): Delete, and initialize lazily.
index b66b4c8d41557c9297b8f1af9cd3f938407b6b22..96cf3af23c515b42181c66c164686e9c971cd980 100644 (file)
@@ -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 ||