Do not try to destroy a channel's nonexistent destruct event.
authorMichael Poole <mdpoole@troilus.org>
Tue, 3 Jan 2006 01:25:50 +0000 (01:25 +0000)
committerMichael Poole <mdpoole@troilus.org>
Tue, 3 Jan 2006 01:25:50 +0000 (01:25 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1600 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
include/ircd_features.h
ircd/channel.c
ircd/ircd_features.c
ircd/m_destruct.c

index 0105980172536fce6bace251457721b71f573555..2c9ce6409835e3fbb58988f899b084fc00a99671 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2006-01-02  Michael Poole <mdpoole@troilus.org>
+
+       * include/ircd_features.h (FEAT_ZANNELS): Remove.
+
+       * ircd/channel.c (sub1_from_channel): Remove reference to
+       FEAT_ZANNELS.
+
+       * ircd/ircd_features.c (FEAT_ZANNELS): Remove.
+
+       * ircd/m_destruct.c (ms_destruct): Do not try to remove a destruct
+       event for channels that do not have them (created by BURSTing a
+       zannel but not yet destroyed by EOB).
+
 2005-12-31  Michael Poole <mdpoole@troilus.org>
 
        * ircd/m_whowas.c (m_whowas): Mention that IP is untracked in WHOWAS.
index 524f23a7a7daab951c2aa3a21d3781ae6f8d299d..77b70f3a14035aba4d68a92460521d77741db6af 100644 (file)
@@ -56,7 +56,6 @@ enum Feature {
   FEAT_HIDDEN_IP,
   FEAT_CONNEXIT_NOTICES,
   FEAT_OPLEVELS,
-  FEAT_ZANNELS,
   FEAT_LOCAL_CHANNELS,
   FEAT_TOPIC_BURST,
 
index dbdd53453082e59450f2b4bd075453962037907e..b04bd3969941aa3c28dcb019558c537e22315e82 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 */
index 0ffad1a201728cc2d4c607ca9966fa22c5e2a46a..fb4c14e77045aa35f3d6af28d09db044ed7f3f7e 100644 (file)
@@ -309,7 +309,6 @@ static struct FeatureDesc {
   F_S(HIDDEN_IP, 0, "127.0.0.1", 0),
   F_B(CONNEXIT_NOTICES, 0, 0, 0),
   F_B(OPLEVELS, 0, 1, 0),
-  F_B(ZANNELS, 0, 1, 0),
   F_B(LOCAL_CHANNELS, 0, 1, 0),
   F_B(TOPIC_BURST, 0, 0, 0),
 
index 89bc1fc2a5b3d9c8d2d2aefb3fcc3e10685f495a..f5b7dd60cfc118cbda14667fcfbf4ea1909403e2 100644 (file)
@@ -190,7 +190,8 @@ int ms_destruct(struct Client* cptr, struct Client* sptr, int parc, char* parv[]
   sendcmdto_serv_butone(&me, CMD_DESTRUCT, 0, "%s %Tu", parv[1], chanTS);
 
   /* Remove the empty channel. */
-  remove_destruct_event(chptr);
+  if (chptr->destruct_event)
+    remove_destruct_event(chptr);
   destruct_channel(chptr);
 
   return 0;