From 5a6f04876e4eef1ae0f01d1a9f089eb73d768065 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Wed, 31 May 2006 02:43:00 +0000 Subject: [PATCH] Comment updates and /stats response fixups. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1660 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 10 ++++++++ doc/readme.features | 60 ++++++++++++++++++++++----------------------- ircd/m_stats.c | 11 ++++++--- 3 files changed, 47 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0b01a6..0d0d6f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-05-28 Michael Poole + + * 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 * ircd/s_auth.c (auth_dns_callback): Be more careful about diff --git a/doc/readme.features b/doc/readme.features index 6412b94..07a405c 100644 --- a/doc/readme.features +++ b/doc/readme.features @@ -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 diff --git a/ircd/m_stats.c b/ircd/m_stats.c index fc3f0af..0ba58c4 100644 --- a/ircd/m_stats.c +++ b/ircd/m_stats.c @@ -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])) -- 2.20.1