Ignore redundant CREATEs (fixes bug #1037963).
[ircu2.10.12-pk.git] / ircd / m_create.c
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 ||