Add a flag to /stats that makes a /stats available to local opers.
[ircu2.10.12-pk.git] / ircd / s_stats.c
index 940e789b9cd2a393b5eac576030566be21e2063b..22781148ae630202d8a92f77e6e96248763bb4a9 100644 (file)
@@ -106,7 +106,7 @@ stats_configured_links(struct Client *sptr, const struct StatDesc* sd,
       if (tmp->status & CONF_UWORLD)
        send_reply(sptr, RPL_STATSULINE, host);
       else if (tmp->status & CONF_SERVER)
-       send_reply(sptr, RPL_STATSCLINE, name, "", "*", port, maximum, hub_limit, get_conf_class(tmp));
+       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->host ? tmp->host : "*"), maximum,
@@ -489,7 +489,6 @@ stats_servers_verbose(struct Client* sptr, const struct StatDesc* sd,
   }
 }
 
-#ifdef DEBUGMODE
 /** Display objects allocated (and total memory used by them) for
  * several types of structures.
  * @param[in] to Client requesting statistics.
@@ -499,10 +498,12 @@ stats_servers_verbose(struct Client* sptr, const struct StatDesc* sd,
 static void
 stats_meminfo(struct Client* to, const struct StatDesc* sd, char* param)
 {
+  extern void bans_send_meminfo(struct Client *cptr);
+
   class_send_meminfo(to);
+  bans_send_meminfo(to);
   send_listinfo(to, 0);
 }
-#endif
 
 /** Send a list of available statistics.
  * @param[in] to Client requesting statistics.
@@ -524,7 +525,7 @@ stats_help(struct Client* to, const struct StatDesc* sd, char* param)
 
 /** Contains information about all statistics. */
 struct StatDesc statsinfo[] = {
-  { 'a', "nameservers", STAT_FLAG_OPERFEAT, FEAT_HIS_STATS_a,
+  { 'a', "nameservers", STAT_FLAG_OPERFEAT|STAT_FLAG_LOCONLY, FEAT_HIS_STATS_a,
     report_dns_servers, 0,
     "DNS servers." },
   { 'c', "connect", STAT_FLAG_OPERFEAT, FEAT_HIS_STATS_c,
@@ -606,11 +607,9 @@ struct StatDesc statsinfo[] = {
   { 'w', "userload", STAT_FLAG_OPERFEAT, FEAT_HIS_STATS_w,
     calc_load, 0,
     "Userload statistics." },
-#ifdef DEBUGMODE
   { 'x', "memusage", STAT_FLAG_OPERFEAT, FEAT_HIS_STATS_x,
     stats_meminfo, 0,
-    "List usage information (Debug only)." },
-#endif
+    "List usage information." },
   { 'y', "classes", STAT_FLAG_OPERFEAT, FEAT_HIS_STATS_y,
     report_classes, 0,
     "Connection classes." },