Comment updates and /stats response fixups.
authorMichael Poole <mdpoole@troilus.org>
Wed, 31 May 2006 02:43:00 +0000 (02:43 +0000)
committerMichael Poole <mdpoole@troilus.org>
Wed, 31 May 2006 02:43:00 +0000 (02:43 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1660 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
doc/readme.features
ircd/m_stats.c

index c0b01a66641cbcc3a942350a37ee6637d32db10a..0d0d6f7a1139c35f663134115e0254180c046744 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-05-28  Michael Poole <mdpoole@troilus.org>
+
+       * doc/readme.features (MAXBANS): Update default value.
+       (NICKLEN): Likewise.
+       (HIS_STATS_*): Sort alphabetically.
+
+       * ircd/m_stats.c (m_stats): Describe the intention so that there
+       are not further questions about local opers and remote /stats.
+       Fix places that use cptr instead of cptr.
+
 2006-05-24  Michael Poole <mdpoole@troilus.org>
 
        * ircd/s_auth.c (auth_dns_callback): Be more careful about
index 6412b941b0fecd6923c8b3a7d2ffbc9d8c7c6757..07a405c6a785b5b5a7a7aecacad385e3e9310545 100644 (file)
@@ -293,7 +293,7 @@ This is the expected average ban mask length.  Leave it at 40.
 
 MAXBANS
  * Type: integer
- * Default: 30
+ * Default: 45
 
 This is the maximum number of bans a user may set on a given channel.
 
@@ -492,35 +492,23 @@ HIS_STATS_a
 
 As per UnderNet CFV-165, this removes /STATS a from users.
 
-HIS_STATS_l
- * Type: boolean
- * Default: TRUE
-
-As per UnderNet CFV-165, this removes /STATS l from users.
-
-HIS_STATS_L
- * Type: boolean
- * Default: TRUE
-
-As per UnderNet CFV-165, this removes /STATS L from users.
-
 HIS_STATS_c
  * Type: boolean
  * Default: TRUE
 
 As per UnderNet CFV-165, this removes /STATS c from users.
 
-HIS_STATS_g
+HIS_STATS_d
  * Type: boolean
  * Default: TRUE
 
-As per UnderNet CFV-165, this removes /STATS g from users.
+As per UnderNet CFV-165, this removes /STATS d from users.
 
-HIS_STATS_k
+HIS_STATS_e
  * Type: boolean
  * Default: TRUE
 
-As per UnderNet CFV-165, this removes /STATS k from users.
+As per UnderNet CFV-165, this removes /STATS e from users.
 
 HIS_STATS_f
  * Type: boolean
@@ -528,6 +516,12 @@ HIS_STATS_f
 
 As per UnderNet CFV-165, this removes /STATS f from users.
 
+HIS_STATS_g
+ * Type: boolean
+ * Default: TRUE
+
+As per UnderNet CFV-165, this removes /STATS g from users.
+
 HIS_STATS_i
  * Type: boolean
  * Default: TRUE
@@ -546,6 +540,24 @@ HIS_STATS_J
 
 As per UnderNet CFV-165, this removes /STATS J from users.
 
+HIS_STATS_k
+ * Type: boolean
+ * Default: TRUE
+
+As per UnderNet CFV-165, this removes /STATS k from users.
+
+HIS_STATS_l
+ * Type: boolean
+ * Default: TRUE
+
+As per UnderNet CFV-165, this removes /STATS l from users.
+
+HIS_STATS_L
+ * Type: boolean
+ * Default: TRUE
+
+As per UnderNet CFV-165, this removes /STATS L from users.
+
 HIS_STATS_M
  * Type: boolean
  * Default: TRUE
@@ -588,18 +600,6 @@ HIS_STATS_R
 
 As per UnderNet CFV-165, this removes /STATS R from users.
 
-HIS_STATS_d
- * Type: boolean
- * Default: TRUE
-
-As per UnderNet CFV-165, this removes /STATS d from users.
-
-HIS_STATS_e
- * Type: boolean
- * Default: TRUE
-
-As per UnderNet CFV-165, this removes /STATS e from users.
-
 HIS_STATS_t
  * Type: boolean
  * Default: TRUE
@@ -767,7 +767,7 @@ This defines a URL that users may visit to find compatible IRC clients.
 
 NICKLEN
  * Type: integer
- * Default: 9
+ * Default: 12
 
 This is the allowed length of the nickname length.  It may not be
 larger than the NICKLEN #define, and should usually be the same
index fc3f0afc2f8324915faa1e1f50007a533598c493..0ba58c42faeeb5ba30a714f427b525337a11d6e2 100644 (file)
@@ -121,7 +121,7 @@ m_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
   const struct StatDesc *sd;
   char *param = 0;
 
-  /* If we didn't find a descriptor and this is my client, send them help */
+  /* If we didn't find a descriptor, send them help */
   if ((parc < 2) || !(sd = stats_find(parv[1])))
       parv[1] = "*", sd = stats_find("*");
 
@@ -131,15 +131,18 @@ m_stats(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
    * not privileged (server or an operator), then the STAT_FLAG_OPERONLY
    * flag must not be set, and if the STAT_FLAG_OPERFEAT flag is set,
    * then the feature given by sd->sd_control must be off.
+   *
+   * This checks cptr rather than sptr so that a local oper may send
+   * /stats queries to other servers.
    */
   if (!IsPrivileged(cptr) &&
       ((sd->sd_flags & STAT_FLAG_OPERONLY) ||
        ((sd->sd_flags & STAT_FLAG_OPERFEAT) && feature_bool(sd->sd_control))))
-    return send_reply(cptr, ERR_NOPRIVILEGES);
+    return send_reply(sptr, ERR_NOPRIVILEGES);
 
   /* Check if they are a local user */
-  if ((sd->sd_flags & STAT_FLAG_LOCONLY) && !MyUser(cptr))
-    return send_reply(cptr, ERR_NOPRIVILEGES);
+  if ((sd->sd_flags & STAT_FLAG_LOCONLY) && !MyUser(sptr))
+    return send_reply(sptr, ERR_NOPRIVILEGES);
 
   /* Check for extra parameter */
   if ((sd->sd_flags & STAT_FLAG_VARPARAM) && parc > 3 && !EmptyString(parv[3]))