Make struct Ban monolithic and improve memory statistics counting.
[ircu2.10.12-pk.git] / ircd / s_stats.c
index bcf339e4326d1636fcbdc06a1bc2367c09b57bc3..05965e70a7b358ba6c608872f9df8c62d4a8e16e 100644 (file)
@@ -106,14 +106,19 @@ 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,
                    (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));
     }
   }
 }
@@ -484,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.
@@ -494,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.
@@ -601,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
   { 'y', "classes", STAT_FLAG_OPERFEAT, FEAT_HIS_STATS_y,
     report_classes, 0,
     "Connection classes." },