Add new feature FEAT_HIS_WHOIS_LOCALCHAN.
authorMichael Poole <mdpoole@troilus.org>
Sat, 11 Sep 2004 18:07:06 +0000 (18:07 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sat, 11 Sep 2004 18:07:06 +0000 (18:07 +0000)
Document it and other head-in-sand features.

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

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

index cad64ac4d40bff901719d473609e8e479384b5c0..4a5664a03e0a6ce277f85cf735621a407a97d46e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2004-09-11  Michael Poole <mdpoole@troilus.org>
+
+       * doc/example.conf: Add examples for FEAT_HIS_* features.
+
+2003-06-08 Matthias Crauwels <ultimate_@wol.be>
+       [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 <mdpoole@troilus.org>
 
        * ircd/ircd_relay.c (server_relay_channel_message,
index 232e5d3992129677e31cd51bd7a8cf38bea1d516..8ca6cb9ae0291c402ffd8d27a100147c8523ee21 100644 (file)
@@ -817,6 +817,56 @@ features
 # "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 2bad879611813268e7537c54c122cf9bf8094686..698e4dbd85893049bf6d15194653db0dfec1b913 100644 (file)
@@ -674,7 +674,8 @@ HIS_WHO_HOPCOUNT
  * 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 @@ HIS_NETSPLIT
 
 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 dd72b3e0165405f03f18d2e9edb76115b76d8f37..e5135877917e9fb99e7ee6891f749db8cce47873 100644 (file)
@@ -129,6 +129,7 @@ enum Feature {
   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 5fb4cf9144fca0578d04f9891574bfbb4f2f3513..7cb126ec83d18f9a9a6ce8569369887de57e4fe6 100644 (file)
@@ -160,7 +160,7 @@ void server_restart(const char *message)
 
   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 @@ int main(int argc, char **argv) {
   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 @@ int main(int argc, char **argv) {
   }
 
   if(thisServer.bootopt & BOOT_CHKCONF) {
-    fprintf(stdout, "Configuration file checked okay.\n");
+    fprintf(stderr, "Configuration file checked okay.\n");
     return 0;
   }
 
index 6756a90149700520eaecf4d1aa54366323919331..6a8f31b6365f9d7a5f1b67966f99da8e06a3db44 100644 (file)
@@ -335,6 +335,7 @@ static struct FeatureDesc {
   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 5660ba66e344445fd786dd921d9d99111f816691..343ca82d7af9414ed91bcaa8574367e693e4b2bb 100644 (file)
@@ -155,11 +155,18 @@ static void do_whois(struct Client* sptr, struct Client *acptr, int parc)
        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';