Committer  : klmitch
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_12_branch
Commit time: 2005-12-23 17:12:16 UTC

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

Log message:

Author: Kev <[EMAIL PROTECTED]>
Log message:

Get rid of MAGIC_REMOTE_JOIN_TS--hasn't been needed for a long time, we've
just been lazy.  Also, fix two bugs having to do with remote users joining
channels: 1) If the timestamps were the same, everybody got deopped; 2) the
deops weren't actually happening, just shown.  Now, the deops actually
happen, and the deop loop is only entered if the remote join TS is older
(less than) the channel timestamp or if the channel is a zannel.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.710.2.47 ircu2.10/ChangeLog:1.710.2.48
--- ircu2.10/ChangeLog:1.710.2.47       Tue Dec 13 19:01:36 2005
+++ ircu2.10/ChangeLog  Fri Dec 23 09:12:06 2005
@@ -1,3 +1,14 @@
+2005-12-23  Kevin L. Mitchell  <[EMAIL PROTECTED]>
+
+       * ircd/m_join.c: get rid of MAGIC_REMOTE_JOIN_TS; perform the
+       deop-other-users loop only when creation < channel timestamp or
+       when the channel in question happens to be a zannel; actually deop
+       users, don't just say we are and not do it
+
+       * ircd/m_create.c (ms_create): get rid of MAGIC_REMOTE_JOIN_TS
+
+       * include/channel.h: get rid of MAGIC_REMOTE_JOIN_TS
+
 2005-12-13  Michael Poole <[EMAIL PROTECTED]>
 
        * configure.in: Define a macro when compiling on Solaris.
Index: ircu2.10/include/channel.h
diff -u ircu2.10/include/channel.h:1.55 ircu2.10/include/channel.h:1.55.2.1
--- ircu2.10/include/channel.h:1.55     Mon Sep 26 19:41:57 2005
+++ ircu2.10/include/channel.h  Fri Dec 23 09:12:06 2005
@@ -19,7 +19,7 @@
  */
 /** @file
  * @brief Channel management and maintenance.
- * @version $Id: channel.h,v 1.55 2005/09/27 02:41:57 entrope Exp $
+ * @version $Id: channel.h,v 1.55.2.1 2005/12/23 17:12:06 klmitch Exp $
  */
 #ifndef INCLUDED_channel_h
 #define INCLUDED_channel_h
@@ -163,15 +163,6 @@
  */
 #define TS_LAG_TIME 86400
 
-/**
- * A Magic TS that is used for channels that are created by JOIN,
- * a channel with this TS accepts all TS without complaining that
- * it might receive later via MODE or CREATE.
- *
- * Part of the P9 compatibility, shouldn't occur on a P10 network.
- */
-#define MAGIC_REMOTE_JOIN_TS 1270080000
-
 
 
 extern const char* const PartFmt1;
Index: ircu2.10/ircd/m_create.c
diff -u ircu2.10/ircd/m_create.c:1.18.2.1 ircu2.10/ircd/m_create.c:1.18.2.2
--- ircu2.10/ircd/m_create.c:1.18.2.1   Sun Nov 13 07:28:17 2005
+++ ircu2.10/ircd/m_create.c    Fri Dec 23 09:12:06 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.2.1 2005/11/13 15:28:17 entrope Exp $
+ * $Id: m_create.c,v 1.18.2.2 2005/12/23 17:12:06 klmitch Exp $
  */
 
 /*
@@ -126,8 +126,7 @@
   /* A create that didn't appear during a burst has that servers idea of
    * the current time.  Use it for lag calculations.
    */
-  if (!IsBurstOrBurstAck(sptr) && 0 != chanTS &&
-      MAGIC_REMOTE_JOIN_TS != chanTS)
+  if (!IsBurstOrBurstAck(sptr) && 0 != chanTS)
     cli_serv(cli_user(sptr)->server)->lag = TStime() - chanTS;
 
   /* If this server is >1 minute fast, warn */
@@ -168,7 +167,6 @@
       /* 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 &&
           /* 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
Index: ircu2.10/ircd/m_join.c
diff -u ircu2.10/ircd/m_join.c:1.34.2.6 ircu2.10/ircd/m_join.c:1.34.2.7
--- ircu2.10/ircd/m_join.c:1.34.2.6     Tue Dec 13 15:45:55 2005
+++ ircu2.10/ircd/m_join.c      Fri Dec 23 09:12:06 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.6 2005/12/13 23:45:55 entrope Exp $
+ * $Id: m_join.c,v 1.34.2.7 2005/12/23 17:12:06 klmitch Exp $
  */
 
 #include "config.h"
@@ -340,8 +340,7 @@
       }
       flags |= HasFlag(sptr, FLAG_TS8) ? CHFL_SERVOPOK : 0;
 
-      /* when the network is 2.10.11+ then remove MAGIC_REMOTE_JOIN_TS */
-      chptr->creationtime = creation ? creation : MAGIC_REMOTE_JOIN_TS;
+      chptr->creationtime = creation;
     }
     else { /* We have a valid channel? */
       if ((member = find_member_link(chptr, sptr)))
@@ -376,8 +375,8 @@
          non-existent, it does not bounce the create with the newer
          timestamp.)
       */
-      if (creation && creation - ((!chptr->mode.apass[0] && chptr->users == 0) 
? 1 : 0) <= chptr->creationtime)
-      {
+      if (creation && (creation < chptr->creationtime ||
+                      (!chptr->mode.apass[0] && chptr->users == 0))) {
         struct Membership *member;
         struct ModeBuf mbuf;
 
@@ -389,8 +388,10 @@
         modebuf_init(&mbuf, sptr, cptr, chptr, MODEBUF_DEST_CHANNEL | 
MODEBUF_DEST_HACK3 | MODEBUF_DEST_SERVER);
         for (member = chptr->members; member; member = member->next_member)
         {
-          if (IsChanOp(member))
+          if (IsChanOp(member)) {
             modebuf_mode_client(&mbuf, MODE_DEL | MODE_CHANOP, member->user, 
OpLevel(member));
+           member->status &= ~CHFL_CHANOP;
+         }
         }
         modebuf_flush(&mbuf);
       }
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
Patches@undernet.org
http://undernet.sbg.org/mailman/listinfo/patches

Reply via email to