Skip reporting mondo db sections in ?stats databases.
authorMichael Poole <mdpoole@troilus.org>
Mon, 8 Jan 2007 04:22:20 +0000 (04:22 +0000)
committerMichael Poole <mdpoole@troilus.org>
Mon, 8 Jan 2007 04:22:20 +0000 (04:22 +0000)
src/saxdb.c (cmd_stats_databases): Only show entries for databases that
    have their own file; skip sections of "mondo".
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-80

ChangeLog
src/saxdb.c

index df9ec224ef8053659f5a7889a2c1da7519006132..a06642188bf2a1d81a56bf4825cd84744a51e9f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,20 @@
 # arch-tag: automatic-ChangeLog--srvx@srvx.net--2006/srvx--devo--1.3
 #
 
+2007-01-08 04:22:20 GMT        Michael Poole <mdpoole@troilus.org>     patch-80
+
+    Summary:
+      Skip reporting mondo db sections in ?stats databases.
+    Revision:
+      srvx--devo--1.3--patch-80
+
+    src/saxdb.c (cmd_stats_databases): Only show entries for databases that
+        have their own file; skip sections of "mondo".
+
+    modified files:
+     ChangeLog src/saxdb.c
+
+
 2007-01-08 04:11:56 GMT        Michael Poole <mdpoole@troilus.org>     patch-79
 
     Summary:
index 4028ccfc25a49bf8ff6ccc1618c90b8454a8fe18..6439af0dfac95daa15621275363e6b8cf60edae6 100644 (file)
@@ -418,6 +418,10 @@ static MODCMD_FUNC(cmd_stats_databases) {
     tbl.contents[0][4] = "Last Duration";
     for (ii=1, it=dict_first(saxdbs); it; it=iter_next(it), ++ii) {
         struct saxdb *db = iter_data(it);
+        if (db->mondo_section) {
+            --ii;
+            continue;
+        }
         char *buf = malloc(INTERVALLEN*3);
         tbl.contents[ii] = calloc(tbl.width, sizeof(tbl.contents[ii][0]));
         tbl.contents[ii][0] = db->name;
@@ -438,6 +442,7 @@ static MODCMD_FUNC(cmd_stats_databases) {
         tbl.contents[ii][3] = buf+INTERVALLEN;
         tbl.contents[ii][4] = buf+INTERVALLEN*2;
     }
+    tbl.length = ii;
     table_send(cmd->parent->bot, user->nick, 0, 0, tbl);
     free(tbl.contents[0]);
     for (ii=1; ii<tbl.length; ++ii) {