Do not send JOIN for zombies given ops or voice.
[ircu2.10.12-pk.git] / ircd / channel.c
index dbdd53453082e59450f2b4bd075453962037907e..99e5182e6df59427cf825313573f17bb60915c23 100644 (file)
@@ -287,22 +287,13 @@ int sub1_from_channel(struct Channel* chptr)
       free_ban(link);
     }
     chptr->banlist = NULL;
-     
-#if 1 /* Temporary code */
-    /* Immediately destruct empty -A channels if ZANNELS is FALSE.
-       When OPLEVELS is true, ZANNELS should be TRUE too. Test for
-       that error. This is done to avoid the DESTRUCT message to
-       occur, which is necessary on a network with mixed versions
-       of 2.10.12.x, with x < 04 *and* 2.10.11 servers. Because
-       servers prior to 2.10.12.04 can cause a BURST message outside
-       the normal net.burst as a result of a DESTRUCT message, and
-       2.10.11 SQUIT servers when they do that. */
-    if (!(feature_bool(FEAT_ZANNELS) || feature_bool(FEAT_OPLEVELS)))
+
+    /* Immediately destruct empty -A channels if not using apass. */
+    if (!feature_bool(FEAT_OPLEVELS))
     {
       destruct_channel(chptr);
       return 0;
     }
-#endif
   }
   if (TStime() - chptr->creationtime < 172800) /* Channel younger than 48 hours? */
     schedule_destruct_event_1m(chptr);         /* Get rid of it in approximately 4-5 minutes */
@@ -1871,7 +1862,7 @@ modebuf_flush_int(struct ModeBuf *mbuf, int all)
        * We're propagating a normal MODE command to the rest of the network;
        * we send the actual channel TS unless this is a HACK3 or a HACK4
        */
-      if (IsServer(mbuf->mb_source))
+      if (IsServer(mbuf->mb_source) || IsMe(mbuf->mb_source))
        sendcmdto_serv_butone(mbuf->mb_source, CMD_MODE, mbuf->mb_connect,
                              "%H %s%s%s%s%s%s %Tu", mbuf->mb_channel,
                              rembuf_i ? "-" : "", rembuf, addbuf_i ? "+" : "",
@@ -3094,7 +3085,7 @@ mode_process_clients(struct ParseState *state)
     /* actually effect the change */
     if (state->flags & MODE_PARSE_SET) {
       if (state->cli_change[i].flag & MODE_ADD) {
-        if (IsDelayedJoin(member))
+        if (IsDelayedJoin(member) && !IsZombie(member))
           RevealDelayedJoin(member);
        member->status |= (state->cli_change[i].flag &
                           (MODE_CHANOP | MODE_VOICE));