+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.
#
/* 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)
}
/* 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 ["
"]", 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? */
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;