Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Tue, 28 Mar 2000 05:33:39 +0000 (05:33 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Tue, 28 Mar 2000 05:33:39 +0000 (05:33 +0000)
Log message:

* include/channel.h: add BOUNCE, renumber flags to get a little
more space

* ircd/channel.c (modebuf_flush): don't overload HACK2, add
BOUNCE; send DESYNCH message

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@89 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
include/channel.h
ircd/channel.c

index 448e9881382078850604f796346e54db22b5d840..0fc26586c6c289a777dc9758d440a23b9df77cb3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-03-28  Kevin L. Mitchell  <klmitch@emc.com>
+
+       * include/channel.h: add BOUNCE, renumber flags to get a little
+       more space
+
+       * ircd/channel.c (modebuf_flush): don't overload HACK2, add
+       BOUNCE; send DESYNCH message
+
 2000-03-27  Kevin L. Mitchell  <klmitch@emc.com>
 
        * ircd/m_clearmode.c (do_clearmode): only mark the modes the
 #
 # ChangeLog for ircu2.10.11
 #
-# $Id: ChangeLog,v 1.34 2000-03-28 02:40:30 kev Exp $
+# $Id: ChangeLog,v 1.35 2000-03-28 05:33:39 kev Exp $
 #
 # Insert new changes at beginning of the change list.
 #
index 5f7fa24e66c7fba3fe239a6dfb7cf5e195998010..6f09862b62ef7e1ccb14ec5ea3731a74d393d3a6 100644 (file)
@@ -251,14 +251,16 @@ struct ModeBuf {
                                        /* A mode w/args */
 };
 
-#define MODEBUF_DEST_CHANNEL   0x01    /* Mode is flushed to channel */
-#define MODEBUF_DEST_SERVER    0x02    /* Mode is flushed to server */
-
-#define MODEBUF_DEST_OPMODE    0x08    /* Send server mode as OPMODE */
-#define MODEBUF_DEST_DEOP      0x10    /* Deop the offender */
-#define MODEBUF_DEST_HACK2     0x20    /* Send a HACK(2) notice, reverse */
-#define MODEBUF_DEST_HACK3     0x40    /* Send a HACK(3) notice, TS == 0 */
-#define MODEBUF_DEST_HACK4     0x80    /* Send a HACK(4) notice, TS == 0 */
+#define MODEBUF_DEST_CHANNEL   0x0001  /* Mode is flushed to channel */
+#define MODEBUF_DEST_SERVER    0x0002  /* Mode is flushed to server */
+
+#define MODEBUF_DEST_OPMODE    0x0100  /* Send server mode as OPMODE */
+#define MODEBUF_DEST_DEOP      0x0200  /* Deop the offender */
+#define MODEBUF_DEST_BOUNCE    0x0400  /* Bounce the modes */
+
+#define MODEBUF_DEST_HACK2     0x2000  /* Send a HACK(2) notice, reverse */
+#define MODEBUF_DEST_HACK3     0x4000  /* Send a HACK(3) notice, TS == 0 */
+#define MODEBUF_DEST_HACK4     0x8000  /* Send a HACK(4) notice, TS == 0 */
 
 #define MB_TYPE(mb, i)         ((mb)->mb_modeargs[(i)].mbm_type)
 #define MB_UINT(mb, i)         ((mb)->mb_modeargs[(i)].mbm_arg.mbma_uint)
index cdad174aef610bb299aafb86eb700a4f5b8225cb..9fe8e42390cfd1e9cc2d91727f6e9d06af8a75a8 100644 (file)
@@ -2923,18 +2923,18 @@ modebuf_flush(struct ModeBuf *mbuf)
     }
 
     /* send the messages off to their destination */
-    if (mbuf->mb_dest & MODEBUF_DEST_CHANNEL)
-      sendto_channel_butserv(mbuf->mb_channel, app_source,
-                            ":%s MODE %s %s%s%s%s%s%s", app_source->name,
-                            mbuf->mb_channel->chname, addbuf_i ? "+" : "",
-                            addbuf, rembuf_i ? "-" : "", rembuf, addstr,
-                            remstr);
-
-    if (mbuf->mb_dest & MODEBUF_DEST_HACK2)
+    if (mbuf->mb_dest & MODEBUF_DEST_HACK2) {
       sendto_op_mask(SNO_HACK2, "HACK(2): %s MODE %s %s%s%s%s%s%s [" TIME_T_FMT
                     "]", app_source->name, mbuf->mb_channel->chname,
                     addbuf_i ? "+" : "", addbuf, rembuf_i ? "-" : "", rembuf,
                     addstr, remstr, mbuf->mb_channel->creationtime);
+      sendto_serv_butone(mbuf->connect, "%s " TOK_DESYNCH
+                        " :HACK: %s MODE %s %s%s%s%s%s%s [" TIME_T_FMT "]",
+                        NumServ(&me), app_source->name,
+                        mbuf->mb_channel->chname, addbuf_i ? "+" : "", addbuf,
+                        rembuf_i ? "-" : "", rembuf, addstr, remstr,
+                        mbuf->mb_channel->creationtime);
+    }
 
     if (mbuf->mb_dest & MODEBUF_DEST_HACK3)
       sendto_op_mask(SNO_HACK3, "BOUNCE or HACK(3): %s MODE %s %s%s%s%s%s%s ["
@@ -2948,6 +2948,13 @@ modebuf_flush(struct ModeBuf *mbuf)
                     "]", app_source->name, mbuf->mb_channel->chname,
                     addbuf_i ? "+" : "", addbuf, rembuf_i ? "-" : "", rembuf,
                     addstr, remstr, mbuf->mb_channel->creationtime);
+
+    if (mbuf->mb_dest & MODEBUF_DEST_CHANNEL)
+      sendto_channel_butserv(mbuf->mb_channel, app_source,
+                            ":%s MODE %s %s%s%s%s%s%s", app_source->name,
+                            mbuf->mb_channel->chname, addbuf_i ? "+" : "",
+                            addbuf, rembuf_i ? "-" : "", rembuf, addstr,
+                            remstr);
   }
 
   /* Now are we supposed to propagate to other servers? */
@@ -3014,7 +3021,7 @@ modebuf_flush(struct ModeBuf *mbuf)
                           mbuf->mb_channel->chname, addbuf_i ? "+" : "",
                           addbuf, rembuf_i ? "-" : "", rembuf, addstr,
                           remstr);
-    } else if (mbuf->mb_dest & MODEBUF_DEST_HACK2) {
+    } else if (mbuf->mb_dest & MODEBUF_DEST_BOUNCE) {
       /*
        * If HACK2 was set, we're bouncing; we send the MODE back to the
        * connection we got it from with the senses reversed and a TS of 0;