Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2005-11-13 15:28:27 UTC

Modified files:
  Tag: u2_10_12_branch
     ChangeLog include/patchlevel.h ircd/m_create.c ircd/m_join.c

Log message:

Fix bugs relating to joining zannels for a quick release.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.25 ircu2.10/ChangeLog:1.710.2.26
--- ircu2.10/ChangeLog:1.710.2.25       Sat Nov 12 18:20:40 2005
+++ ircu2.10/ChangeLog  Sun Nov 13 07:28:15 2005
@@ -1,3 +1,14 @@
+2005-11-13  Michael Poole <[EMAIL PROTECTED]>
+
+       * include/patchlevel.h (PATCHLEVEL): Update for release.
+
+2005-11-13  Carlo Wood <[EMAIL PROTECTED]>
+
+       * ircd/m_create (ms_create): Accept CREATE for zannels.
+
+       * ircd/m_join.c (m_join): MODE +o for a zannel must come from the
+       server for compatibility with older versions.
+
 2005-11-12  Michael Poole <[EMAIL PROTECTED]>
 
        * include/patchlevel.h (PATCHLEVEL): Bump for pre03.
Index: ircu2.10/include/patchlevel.h
diff -u ircu2.10/include/patchlevel.h:1.23.2.7 
ircu2.10/include/patchlevel.h:1.23.2.8
--- ircu2.10/include/patchlevel.h:1.23.2.7      Sat Nov 12 18:20:40 2005
+++ ircu2.10/include/patchlevel.h       Sun Nov 13 07:28:17 2005
@@ -15,10 +15,10 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: patchlevel.h,v 1.23.2.7 2005/11/13 02:20:40 entrope Exp $
+ * $Id: patchlevel.h,v 1.23.2.8 2005/11/13 15:28:17 entrope Exp $
  *
  */
-#define PATCHLEVEL "pre03"
+#define PATCHLEVEL "03"
 
 #define RELEASE ".12."
 
Index: ircu2.10/ircd/m_create.c
diff -u ircu2.10/ircd/m_create.c:1.18 ircu2.10/ircd/m_create.c:1.18.2.1
--- ircu2.10/ircd/m_create.c:1.18       Mon Sep 26 19:41:57 2005
+++ ircu2.10/ircd/m_create.c    Sun Nov 13 07:28:17 2005
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_create.c,v 1.18 2005/09/27 02:41:57 entrope Exp $
+ * $Id: m_create.c,v 1.18.2.1 2005/11/13 15:28:17 entrope Exp $
  */
 
 /*
@@ -168,7 +168,27 @@
       /* 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)) {
+          chptr->creationtime != MAGIC_REMOTE_JOIN_TS &&
+          /* Accept CREATE for zannels. This is only really necessary on a 
network
+             with servers prior to 2.10.12.02: we just accept their TS and 
ignore
+             the fact that it was a zannel. The influence of this on a network
+             that is completely 2.10.12.03 or higher is neglectable: Normally
+             a server only sends a CREATE after first sending a DESTRUCT. Thus,
+             by receiving a CREATE for a zannel one of two things happened:
+             1. The DESTRUCT was sent during a net.break; this could mean that
+                our zannel is at the verge of expiring too, it should have been
+                destructed. It is correct to copy the newer TS now, all modes
+                already have been reset, so it will be as if it was destructed
+                and immediately recreated. In order to avoid desyncs of modes,
+                we don't accept a CREATE for channels that have +A set.
+             2. The DESTRUCT passed, then someone created the channel on our
+                side and left it again. In this situation we have a near
+                simultaneous creation on two servers; the person on our side
+                already left within the time span of a message propagation.
+                The channel will therefore be less than 48 hours old and no
+                'protection' is necessary.
+           */
+          !(chptr->users == 0 && !chptr->mode.apass[0]))) {
        modebuf_init(&mbuf, sptr, cptr, chptr,
                     (MODEBUF_DEST_SERVER |  /* Send mode to server */
                      MODEBUF_DEST_HACK2  |  /* Send a HACK(2) message */
Index: ircu2.10/ircd/m_join.c
diff -u ircu2.10/ircd/m_join.c:1.34.2.3 ircu2.10/ircd/m_join.c:1.34.2.4
--- ircu2.10/ircd/m_join.c:1.34.2.3     Mon Oct 31 15:16:56 2005
+++ ircu2.10/ircd/m_join.c      Sun Nov 13 07:28:17 2005
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: m_join.c,v 1.34.2.3 2005/10/31 23:16:56 entrope Exp $
+ * $Id: m_join.c,v 1.34.2.4 2005/11/13 15:28:17 entrope Exp $
  */
 
 #include "config.h"
@@ -245,10 +245,18 @@
 
       joinbuf_join(&join, chptr, flags);
       if (flags & CHFL_CHANOP) {
+        struct ModeBuf mbuf;
+#if 0
         /* Send a MODE to the other servers. If the user used the A/U pass,
         * let his server op him, otherwise let him op himself. */
-        struct ModeBuf mbuf;
        modebuf_init(&mbuf, chptr->mode.apass[0] ? &me : sptr, cptr, chptr, 
MODEBUF_DEST_SERVER);
+#else
+       /* Always let the server op him: this is needed on a net with older 
servers
+          because they 'destruct' channels immediately when they become empty 
without
+          sending out a DESTRUCT message. As a result, they would always 
bounce a mode
+          (as HACK(2)) when the user ops himself. */
+       modebuf_init(&mbuf, &me, cptr, chptr, MODEBUF_DEST_SERVER);
+#endif
        modebuf_mode_client(&mbuf, MODE_ADD | MODE_CHANOP, sptr,
                             chptr->mode.apass[0] ? ((flags & 
CHFL_CHANNEL_MANAGER) ? 0 : 1) : MAXOPLEVEL);
        modebuf_flush(&mbuf);
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to