This patch will allow admins to prevent the server from concealing
server names on channel mode changes. It implements a new feature
called HIS_MODEWHO, whose default behavior is true--so the default
behavior is to conceal them. This patch was written and tested against
the u2.10.12.03 release. (On a side note, the equivalent changes were
also tested in the u2.10.11.07 release and worked fine.)

With HIS_MODEWHO set to false:
[10:08] cs.testnet.org sets mode: +o CS

Without defining HIS_MODEWHO, or setting it to true:
[10:08] *.testnet.org sets mode: +o CS

- Brian


diff -ur ircu2.10.12.03/ChangeLog ircu2.10.12.03-fix/ChangeLog
--- ircu2.10.12.03/ChangeLog    2005-11-13 10:24:31.000000000 -0500
+++ ircu2.10.12.03-fix/ChangeLog        2005-11-16 10:05:31.000000000 -0500
@@ -1,3 +1,18 @@
+2005-11-15  Brian Cline <[EMAIL PROTECTED]>
+
+       * doc/example.conf: Add new line for HIS_MODEWHO feature.
+
+       * doc/readme.features: Document new HIS_MODEWHO feature.
+
+       * include/ircd_features.h: Declare new HIS_MODEWHO feature.
+
+       * ircd/channel.c (modebuf_flush_int): Use new HIS_MODEWHO feature
+       to show or hide the server name that performed a channel mode change.
+
+       * ircd/ircd_features.c: Place new HIS_MODEWHO setting in the feature
+       table and give it a default value of true, which will hide the
+       originating server name.
+
 2005-11-13  Michael Poole <[EMAIL PROTECTED]>

        * include/patchlevel.h (PATCHLEVEL): Update for release.
diff -ur ircu2.10.12.03/doc/example.conf ircu2.10.12.03-fix/doc/example.conf
--- ircu2.10.12.03/doc/example.conf     2005-10-12 13:41:24.000000000 -0400
+++ ircu2.10.12.03-fix/doc/example.conf 2005-11-16 10:03:47.000000000 -0500
@@ -853,6 +853,7 @@
 #  "HIS_WHOIS_LOCALCHAN" = "TRUE";
 #  "HIS_WHO_SERVERNAME" = "TRUE";
 #  "HIS_WHO_HOPCOUNT" = "TRUE";
+#  "HIS_MODEWHO" = "TRUE";
 #  "HIS_BANWHO" = "TRUE";
 #  "HIS_KILLWHO" = "TRUE";
 #  "HIS_REWRITE" = "TRUE";
diff -ur ircu2.10.12.03/doc/readme.features
ircu2.10.12.03-fix/doc/readme.features
--- ircu2.10.12.03/doc/readme.features  2005-07-16 20:00:19.000000000 -0400
+++ ircu2.10.12.03-fix/doc/readme.features      2005-11-16 09:48:39.000000000 
-0500
@@ -679,6 +679,13 @@
 As per UnderNet CFV-165, this replaces hopcount to a static 3 in
 replies to /WHO.

+HIS_MODEWHO
+ * Type: boolean
+ * Default: TRUE
+
+As per UnderNet CFV-165, this doesn't show which server performed a channel
+mode change.
+
 HIS_BANWHO
  * Type: boolean
  * Default: TRUE
diff -ur ircu2.10.12.03/include/ircd_features.h
ircu2.10.12.03-fix/include/ircd_features.h
--- ircu2.10.12.03/include/ircd_features.h      2005-07-14 23:02:32.000000000 
-0400
+++ ircu2.10.12.03-fix/include/ircd_features.h  2005-11-16
09:49:02.000000000 -0500
@@ -139,6 +139,7 @@
   FEAT_HIS_WHOIS_LOCALCHAN,
   FEAT_HIS_WHO_SERVERNAME,
   FEAT_HIS_WHO_HOPCOUNT,
+  FEAT_HIS_MODEWHO,
   FEAT_HIS_BANWHO,
   FEAT_HIS_KILLWHO,
   FEAT_HIS_REWRITE,
diff -ur ircu2.10.12.03/ircd/channel.c ircu2.10.12.03-fix/ircd/channel.c
--- ircu2.10.12.03/ircd/channel.c       2005-11-09 07:36:12.000000000 -0500
+++ ircu2.10.12.03-fix/ircd/channel.c   2005-11-16 10:02:44.000000000 -0500
@@ -1563,7 +1563,10 @@

   /* Ok, if we were given the OPMODE flag, or its a server, hide the source.
    */
-  if (mbuf->mb_dest & MODEBUF_DEST_OPMODE ||
IsServer(mbuf->mb_source) || IsMe(mbuf->mb_source))
+  if (feature_bool(FEAT_HIS_MODEWHO) &&
+      (mbuf->mb_dest & MODEBUF_DEST_OPMODE ||
+       IsServer(mbuf->mb_source) ||
+       IsMe(mbuf->mb_source)))
     app_source = &his;
   else
     app_source = mbuf->mb_source;
diff -ur ircu2.10.12.03/ircd/ircd_features.c
ircu2.10.12.03-fix/ircd/ircd_features.c
--- ircu2.10.12.03/ircd/ircd_features.c 2005-07-15 17:28:34.000000000 -0400
+++ ircu2.10.12.03-fix/ircd/ircd_features.c     2005-11-16 09:50:19.000000000 
-0500
@@ -392,6 +392,7 @@
   F_B(HIS_WHOIS_LOCALCHAN, 0, 1, 0),
   F_B(HIS_WHO_SERVERNAME, 0, 1, 0),
   F_B(HIS_WHO_HOPCOUNT, 0, 1, 0),
+  F_B(HIS_MODEWHO, 0, 1, 0),
   F_B(HIS_BANWHO, 0, 1, 0),
   F_B(HIS_KILLWHO, 0, 1, 0),
   F_B(HIS_REWRITE, 0, 1, 0),

_______________________________________________
Coder-com mailing list
Coder-com@undernet.org
http://undernet.sbg.org/mailman/listinfo/coder-com

Reply via email to