Reflect local vs global status in output of "/stats o".
authorMichael Poole <mdpoole@troilus.org>
Mon, 30 May 2005 13:23:24 +0000 (13:23 +0000)
committerMichael Poole <mdpoole@troilus.org>
Mon, 30 May 2005 13:23:24 +0000 (13:23 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@1413 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
ircd/s_err.c
ircd/s_stats.c

index 1951e75337c081553b648ebc9d155304e9f8330e..d87124eae37bb6eccb46a667ad743ae617713e01 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-05-25 Reed Loden <reed@reedloden.com>
+
+       * 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 <mdpoole@troilus.org>
 
        * ircd/IPcheck.c: Add Debug()s to try to track why the connected
index 67af1bba4b3fb3948d471c7ae47c672954734b72..979ae0b66304b76f1719459a7d5a7a8d1710ebcc 100644 (file)
@@ -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 */
index bcf339e4326d1636fcbdc06a1bc2367c09b57bc3..940e789b9cd2a393b5eac576030566be21e2063b 100644 (file)
@@ -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));
     }
   }
 }