Provide /stats F to report even defaulted feature values.
[ircu2.10.12-pk.git] / ircd / s_stats.c
index bfc2d584d8a942520b30644df075ebdd00231f78..c3f01cd7c43abc0e64b5c2c5fe01dc748d253a47 100644 (file)
@@ -110,6 +110,7 @@ stats_configured_links(struct Client *sptr, const struct StatDesc* sd,
        send_reply(sptr, RPL_STATSCLINE, name, port, maximum, hub_limit, get_conf_class(tmp));
       else if (tmp->status & CONF_CLIENT)
         send_reply(sptr, RPL_STATSILINE,
+                   (tmp->username ? tmp->username : ""), (tmp->username ? "@" : ""),
                    (tmp->host ? tmp->host : "*"), maximum,
                    (name[0] == ':' ? "0" : ""), (tmp->name ? tmp->name : "*"),
                    port, get_conf_class(tmp));
@@ -184,6 +185,7 @@ stats_access(struct Client *to, const struct StatDesc *sd, char *param)
            || (aconf->name && !match(param, aconf->name))))
     {
       send_reply(to, RPL_STATSILINE,
+                 (aconf->username ? aconf->username : ""), (aconf->username ? "@" : ""), 
                  (aconf->host ? aconf->host : "*"), aconf->maximum,
                  (aconf->name && aconf->name[0] == ':' ? "0":""),
                  aconf->name ? aconf->name : "*",
@@ -542,9 +544,12 @@ struct StatDesc statsinfo[] = {
   { 'e', "engine", STAT_FLAG_OPERFEAT, FEAT_HIS_STATS_e,
     stats_engine, 0,
     "Report server event loop engine." },
-  { 'f', "features", STAT_FLAG_OPERFEAT, FEAT_HIS_STATS_f,
+  { 'f', "features", (STAT_FLAG_OPERFEAT | STAT_FLAG_CASESENS), FEAT_HIS_STATS_f,
     feature_report, 0,
     "Feature settings." },
+  { 'F', "featuresall", (STAT_FLAG_OPERFEAT | STAT_FLAG_CASESENS), FEAT_HIS_STATS_f,
+    feature_report, 1,
+    "All feature settings, including defaulted values." },
   { 'g', "glines", STAT_FLAG_OPERFEAT, FEAT_HIS_STATS_g,
     gline_stats, 0,
     "Global bans (G-lines)." },