Committer  : entrope
CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Commit time: 2004-09-11 18:07:16 UTC

Modified files:
     ChangeLog doc/example.conf doc/readme.features
     include/ircd_features.h ircd/ircd.c ircd/ircd_features.c
     ircd/m_whois.c

Log message:

Add new feature FEAT_HIS_WHOIS_LOCALCHAN.
Document it and other head-in-sand features.

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.460 ircu2.10/ChangeLog:1.461
--- ircu2.10/ChangeLog:1.460    Sat Sep 11 10:00:50 2004
+++ ircu2.10/ChangeLog  Sat Sep 11 11:07:03 2004
@@ -1,5 +1,22 @@
 2004-09-11  Michael Poole <[EMAIL PROTECTED]>
 
+       * doc/example.conf: Add examples for FEAT_HIS_* features.
+
+2003-06-08 Matthias Crauwels <[EMAIL PROTECTED]>
+       [Feature renamed to FEAT_HIS_WHOIS_LOCALCHAN by Michael Poole.]
+
+       * include/ircd_features.h: new feature FEAT_HIS_LOCAL_CHAN_WHOIS
+
+       * ircd/ircd_features.c: new feature FEAT_HIS_LOCAL_CHAN_WHOIS
+
+       * ircd/m_whois.c: hide local channels in local WHOIS, this breaks HIS
+
+       * doc/readme.features: documented FEAT_HIS_LOCAL_CHAN_WHOIS
+
+       * doc/ircd.conf.sample: default value for FEAT_HIS_LOCAL_CHAN_WHOIS
+
+2004-09-11  Michael Poole <[EMAIL PROTECTED]>
+
        * ircd/ircd_relay.c (server_relay_channel_message,
        server_relay_channel_notice): Do not allow other servers to send
        or relay to local channels.
Index: ircu2.10/doc/example.conf
diff -u ircu2.10/doc/example.conf:1.32 ircu2.10/doc/example.conf:1.33
--- ircu2.10/doc/example.conf:1.32      Fri Sep 10 15:31:14 2004
+++ ircu2.10/doc/example.conf   Sat Sep 11 11:07:05 2004
@@ -817,6 +817,56 @@
 # "OPLEVELS" = "TRUE";
 # "LOCAL_CHANNELS" = "TRUE";
 # "ANNOUNCE_INVITES" = "FALSE";
+#  These were introduced by Undernet CFV-165 to add "Head-In-Sand" (HIS)
+#  behavior to hide most network topology from users.
+#  "HIS_SNOTICES" = "TRUE";
+#  "HIS_SNOTICES_OPER_ONLY" = "TRUE";
+#  "HIS_DEBUG_OPER_ONLY" = "TRUE";
+#  "HIS_WALLOPS" = "TRUE";
+#  "HIS_MAP" = "TRUE";
+#  "HIS_LINKS" = "TRUE";
+#  "HIS_TRACE" = "TRUE";
+#  "HIS_STATS_a" = "TRUE";
+#  "HIS_STATS_c" = "TRUE";
+#  "HIS_STATS_d" = "TRUE";
+#  "HIS_STATS_e" = "TRUE";
+#  "HIS_STATS_f" = "TRUE";
+#  "HIS_STATS_g" = "TRUE";
+#  "HIS_STATS_h" = "TRUE";
+#  "HIS_STATS_i" = "TRUE";
+#  "HIS_STATS_j" = "TRUE";
+#  "HIS_STATS_k" = "TRUE";
+#  "HIS_STATS_l" = "TRUE";
+#  "HIS_STATS_L" = "TRUE";
+#  "HIS_STATS_m" = "TRUE";
+#  "HIS_STATS_M" = "TRUE";
+#  "HIS_STATS_o" = "TRUE";
+#  "HIS_STATS_p" = "TRUE";
+#  "HIS_STATS_q" = "TRUE";
+#  "HIS_STATS_r" = "TRUE";
+#  "HIS_STATS_R" = "TRUE";
+#  "HIS_STATS_t" = "TRUE";
+#  "HIS_STATS_T" = "TRUE";
+#  "HIS_STATS_u" = "FALSE";
+#  "HIS_STATS_U" = "TRUE";
+#  "HIS_STATS_v" = "TRUE";
+#  "HIS_STATS_w" = "TRUE";
+#  "HIS_STATS_x" = "TRUE";
+#  "HIS_STATS_y" = "TRUE";
+#  "HIS_STATS_z" = "TRUE";
+#  "HIS_WHOIS_SERVERNAME" = "TRUE";
+#  "HIS_WHOIS_IDLETIME" = "TRUE";
+#  "HIS_WHOIS_LOCALCHAN" = "TRUE";
+#  "HIS_WHO_SERVERNAME" = "TRUE";
+#  "HIS_WHO_HOPCOUNT" = "TRUE";
+#  "HIS_BANWHO" = "TRUE";
+#  "HIS_KILLWHO" = "TRUE";
+#  "HIS_REWRITE" = "TRUE";
+#  "HIS_REMOTE" = "TRUE";
+#  "HIS_NETSPLIT" = "TRUE";
+#  "HIS_SERVERNAME" = "*.undernet.org";
+#  "HIS_SERVERINFO" = "The Undernet Underworld";
+#  "HIS_URLSERVERS" = "http://www.undernet.org/servers.php";;
 };
 
 # Well, you have now reached the end of this sample configuration
Index: ircu2.10/doc/readme.features
diff -u ircu2.10/doc/readme.features:1.12 ircu2.10/doc/readme.features:1.13
--- ircu2.10/doc/readme.features:1.12   Fri Sep 10 15:31:14 2004
+++ ircu2.10/doc/readme.features        Sat Sep 11 11:07:05 2004
@@ -674,7 +674,8 @@
  * Type: boolean
  * Default: TRUE
 
-As per UnderNet CFV-165, this replaces hopcount to a static 3 in replies to /WHO.
+As per UnderNet CFV-165, this replaces hopcount to a static 3 in
+replies to /WHO.
 
 HIS_BANWHO
  * Type: boolean
@@ -708,6 +709,12 @@
 
 As per UnderNet CFV-165, this removes server names in net break sign-offs.
 
+HIS_WHOIS_LOCALCHAN
+ * Type: boolean
+ * Default: TRUE
+
+As per UnderNet CFV-165, this removes local channels in replies to /WHOIS.
+
 HIS_SERVERNAME
  * Type: string
  * Default: "*.undernet.org"
Index: ircu2.10/include/ircd_features.h
diff -u ircu2.10/include/ircd_features.h:1.29 ircu2.10/include/ircd_features.h:1.30
--- ircu2.10/include/ircd_features.h:1.29       Fri Sep 10 15:31:14 2004
+++ ircu2.10/include/ircd_features.h    Sat Sep 11 11:07:05 2004
@@ -18,7 +18,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: ircd_features.h,v 1.29 2004/09/10 22:31:14 entrope Exp $
+ * $Id: ircd_features.h,v 1.30 2004/09/11 18:07:05 entrope Exp $
  */
 
 struct Client;
@@ -129,6 +129,7 @@
   FEAT_HIS_STATS_z,
   FEAT_HIS_WHOIS_SERVERNAME,
   FEAT_HIS_WHOIS_IDLETIME,
+  FEAT_HIS_WHOIS_LOCALCHAN,
   FEAT_HIS_WHO_SERVERNAME,
   FEAT_HIS_WHO_HOPCOUNT,
   FEAT_HIS_BANWHO,
Index: ircu2.10/ircd/ircd.c
diff -u ircu2.10/ircd/ircd.c:1.70 ircu2.10/ircd/ircd.c:1.71
--- ircu2.10/ircd/ircd.c:1.70   Fri Sep 10 19:06:04 2004
+++ ircu2.10/ircd/ircd.c        Sat Sep 11 11:07:05 2004
@@ -17,7 +17,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: ircd.c,v 1.70 2004/09/11 02:06:04 entrope Exp $
+ * $Id: ircd.c,v 1.71 2004/09/11 18:07:05 entrope Exp $
  */
 #include "config.h"
 
@@ -160,7 +160,7 @@
 
   log_close();
 
-  close_connections(!(thisServer.bootopt & (BOOT_TTY | BOOT_DEBUG)));
+  close_connections(!(thisServer.bootopt & (BOOT_TTY | BOOT_DEBUG | BOOT_CHKCONF)));
 
   execv(SPATH, thisServer.argv);
 
@@ -641,7 +641,7 @@
   if (!init_connection_limits())
     return 9;
 
-  close_connections(!(thisServer.bootopt & (BOOT_DEBUG | BOOT_TTY)));
+  close_connections(!(thisServer.bootopt & (BOOT_DEBUG | BOOT_TTY | BOOT_CHKCONF)));
 
   event_init(MAXCONNECTIONS);
 
@@ -678,7 +678,7 @@
   }
 
   if(thisServer.bootopt & BOOT_CHKCONF) {
-    fprintf(stdout, "Configuration file checked okay.\n");
+    fprintf(stderr, "Configuration file checked okay.\n");
     return 0;
   }
 
Index: ircu2.10/ircd/ircd_features.c
diff -u ircu2.10/ircd/ircd_features.c:1.37 ircu2.10/ircd/ircd_features.c:1.38
--- ircu2.10/ircd/ircd_features.c:1.37  Fri Sep 10 15:31:14 2004
+++ ircu2.10/ircd/ircd_features.c       Sat Sep 11 11:07:06 2004
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: ircd_features.c,v 1.37 2004/09/10 22:31:14 entrope Exp $
+ * $Id: ircd_features.c,v 1.38 2004/09/11 18:07:06 entrope Exp $
  */
 #include "config.h"
 
@@ -335,6 +335,7 @@
   F_B(HIS_STATS_z, 0, 1, 0),
   F_B(HIS_WHOIS_SERVERNAME, 0, 1, 0),
   F_B(HIS_WHOIS_IDLETIME, 0, 1, 0),
+  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_BANWHO, 0, 1, 0),
Index: ircu2.10/ircd/m_whois.c
diff -u ircu2.10/ircd/m_whois.c:1.32 ircu2.10/ircd/m_whois.c:1.33
--- ircu2.10/ircd/m_whois.c:1.32        Wed Aug 18 21:00:52 2004
+++ ircu2.10/ircd/m_whois.c     Sat Sep 11 11:07:06 2004
@@ -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_whois.c,v 1.32 2004/08/19 04:00:52 entrope Exp $
+ * $Id: m_whois.c,v 1.33 2004/09/11 18:07:06 entrope Exp $
  */
 
 /*
@@ -155,11 +155,18 @@
        if (!ShowChannel(sptr, chptr)
            && !(IsOper(sptr) && IsLocalChannel(chptr->chname)))
           continue;
-          
+
        if (acptr != sptr && IsZombie(chan))
           continue;
-          
-       if (len+strlen(chptr->chname) + mlen > BUFSIZE - 5) 
+
+       /* Don't show local channels when HIS is defined, unless it's a
+       * remote WHOIS --ULtimaTe_
+       */
+       if (IsLocalChannel(chptr->chname) && (acptr != sptr) && (parc == 2)
+           && feature_bool(FEAT_HIS_WHOIS_LOCALCHAN) && !IsAnOper(sptr))
+         continue;
+
+       if (len+strlen(chptr->chname) + mlen > BUFSIZE - 5)
        {
           send_reply(sptr, SND_EXPLICIT | RPL_WHOISCHANNELS, "%s :%s", name, buf);
           *buf = '\0';
----------------------- End of diff -----------------------

Reply via email to