From: Michael Poole Date: Mon, 8 Jan 2007 04:22:20 +0000 (+0000) Subject: Skip reporting mondo db sections in ?stats databases. X-Git-Tag: v1.4.0-rc1~76 X-Git-Url: http://git.pk910.de/?p=srvx.git;a=commitdiff_plain;h=ed1e8c2461ff3691c27cd7a79befa6c7a915844e Skip reporting mondo db sections in ?stats databases. 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 --- diff --git a/ChangeLog b/ChangeLog index df9ec22..a066421 100644 --- 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 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 patch-79 Summary: diff --git a/src/saxdb.c b/src/saxdb.c index 4028ccf..6439af0 100644 --- a/src/saxdb.c +++ b/src/saxdb.c @@ -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