--- ../../../releases/ircu2.10.11.07/ircd/m_create.c	2003-01-07 12:15:43.000000000 +0100
+++ m_create.c	2004-11-04 03:58:45.000000000 +0100
@@ -108,10 +108,8 @@
   char *p; /* strtok state */
   char *name; /* channel name */
   struct Channel *chptr; /* channel */
-  struct JoinBuf join; /* join and create buffers */
-  struct JoinBuf create;
+  struct JoinBuf create; /* create buffer */
   struct ModeBuf mbuf; /* a mode buffer */
-  int badop; /* a flag */
 
   if (IsServer(sptr))
     return protocol_violation(sptr,"%s tried to CREATE a channel", cli_name(sptr));
@@ -144,46 +142,47 @@
 		       "%Tu %C", TStime(), cli_user(sptr)->server);
   }
 
-  joinbuf_init(&join, sptr, cptr, JOINBUF_TYPE_JOIN, 0, 0);
   joinbuf_init(&create, sptr, cptr, JOINBUF_TYPE_CREATE, 0, chanTS);
 
-  /* For each channel in the comma seperated list: */
+  /* For each channel in the comma separated list: */
   for (name = ircd_strtok(&p, parv[1], ","); name;
-       name = ircd_strtok(&p, 0, ",")) {
-    badop = 0;
-
+       name = ircd_strtok(&p, 0, ","))
+  {
     if (IsLocalChannel(name))
       continue;
 
-    if ((chptr = FindChannel(name))) {
+    if ((chptr = FindChannel(name)))
+    {
+      /* Channel exists */
       name = chptr->chname;
 
       /* Check if we need to bounce a mode */
       if (TStime() - chanTS > TS_LAG_TIME ||
-	  (chptr->creationtime && chanTS > chptr->creationtime &&
-	   chptr->creationtime != MAGIC_REMOTE_JOIN_TS)) {
-	modebuf_init(&mbuf, sptr, cptr, chptr,
-		     (MODEBUF_DEST_SERVER |  /* Send mode to server */
-		      MODEBUF_DEST_HACK2  |  /* Send a HACK(2) message */
-		      MODEBUF_DEST_BOUNCE)); /* And bounce the mode */
-
-	modebuf_mode_client(&mbuf, MODE_ADD | MODE_CHANOP, sptr);
-
-	modebuf_flush(&mbuf);
-
-	badop = 1;
+          (chptr->creationtime && chanTS > chptr->creationtime &&
+           chptr->creationtime != MAGIC_REMOTE_JOIN_TS))
+      {
+        modebuf_init(&mbuf, sptr, cptr, chptr,
+            (MODEBUF_DEST_SERVER |  /* Send mode to server */
+             MODEBUF_DEST_HACK2  |  /* Send a HACK(2) message */
+             MODEBUF_DEST_BOUNCE)); /* And bounce the mode */
+        modebuf_mode_client(&mbuf, MODE_ADD | MODE_CHANOP, sptr);
+        modebuf_flush(&mbuf);
       }
-    } else                        /* Channel doesn't exist: create it */
+    }
+    else
+    {
+      /* Channel doesn't exist: create it */
       chptr = get_channel(sptr, name, CGT_CREATE);
 
-    if (!badop) /* Set/correct TS */
+      /* Set/correct TS */
       chptr->creationtime = chanTS;
 
-    joinbuf_join(badop ? &join : &create, chptr,
-		 (badop ? 0 : CHFL_CHANOP));
+      /* Add the channel creation to the join buffer */
+      joinbuf_join(&create, chptr, CHFL_CHANOP);
+    }
   }
 
-  joinbuf_flush(&join); /* flush out the joins and creates */
+  /* flush out the creates */
   joinbuf_flush(&create);
 
   return 0;
