From: Michael Poole Date: Mon, 30 May 2005 13:23:24 +0000 (+0000) Subject: Reflect local vs global status in output of "/stats o". X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;h=c2050b07e7fb3bf2420fdb317ea024793666ef9c;p=ircu2.10.12-pk.git Reflect local vs global status in output of "/stats o". git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1413 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- diff --git a/ChangeLog b/ChangeLog index 1951e75..d87124e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-05-25 Reed Loden + + * ircd/s_err.c (replyTable): Allow for the specification of 'O' or + 'o' in RPL_STATSOLINE. + + * ircd/s_stats.c (stats_configured_links): In /stats o/O, display + 'O' if either the oper block or the connection class has + PRIV_PROPAGATE (global oper) and 'o' if neither has PRIV_PROPAGATE + (local oper). + 2005-05-30 Michael Poole * ircd/IPcheck.c: Add Debug()s to try to track why the connected diff --git a/ircd/s_err.c b/ircd/s_err.c index 67af1bb..979ae0b 100644 --- a/ircd/s_err.c +++ b/ircd/s_err.c @@ -518,7 +518,7 @@ static Numeric replyTable[] = { /* 242 */ { RPL_STATSUPTIME, ":Server Up %d days, %d:%02d:%02d", "242" }, /* 243 */ - { RPL_STATSOLINE, "O %s@%s * %s %s", "243" }, + { RPL_STATSOLINE, "%c %s@%s * %s %s", "243" }, /* 244 */ { 0 }, /* 245 */ diff --git a/ircd/s_stats.c b/ircd/s_stats.c index bcf339e..940e789 100644 --- a/ircd/s_stats.c +++ b/ircd/s_stats.c @@ -113,7 +113,12 @@ stats_configured_links(struct Client *sptr, const struct StatDesc* sd, (name[0] == ':' ? "0" : ""), (tmp->name ? tmp->name : "*"), port, get_conf_class(tmp)); else if (tmp->status & CONF_OPERATOR) - send_reply(sptr, RPL_STATSOLINE, username, host, name, get_conf_class(tmp)); + send_reply(sptr, RPL_STATSOLINE, + ((FlagHas(&tmp->privs_dirty, PRIV_PROPAGATE) + && FlagHas(&tmp->privs, PRIV_PROPAGATE)) + || (FlagHas(&tmp->conn_class->privs_dirty, PRIV_PROPAGATE) + && FlagHas(&tmp->conn_class->privs, PRIV_PROPAGATE))) + ? 'O' : 'o', username, host, name, get_conf_class(tmp)); } } }