From: pk910 Date: Tue, 27 Aug 2013 15:22:18 +0000 (+0200) Subject: show MAXSENDQ value in cmd_listdevnull X-Git-Url: http://git.pk910.de/?p=srvx.git;a=commitdiff_plain;h=189ce3434b260169ae7f5af2f3f203e995f7c5de show MAXSENDQ value in cmd_listdevnull --- diff --git a/src/opserv.c b/src/opserv.c index ccede74..6c6ac33 100644 --- a/src/opserv.c +++ b/src/opserv.c @@ -4312,8 +4312,7 @@ static MODCMD_FUNC(cmd_listdevnull) tbl.contents[0][12] = "+X"; tbl.contents[0][13] = "MaxQ"; tbl.contents[0][14] = "OpMe"; - if(!count) - { + if(!count) { table_send(cmd->parent->bot, user->nick, 0, NULL, tbl); reply("MSG_NONE"); free(tbl.contents[0]); @@ -4387,9 +4386,11 @@ static MODCMD_FUNC(cmd_listdevnull) tbl.contents[ii][12] = off; } if(DEVNULL_HAS_PRIV(th, MAXSENDQ)) { - tbl.contents[ii][13] = on; + char maxsenqbuf[MAXLEN]; + sprintf(maxsenqbuf, "%lu", th->maxsendq); + tbl.contents[ii][13] = strdup(maxsenqbuf); } else { - tbl.contents[ii][13] = off; + tbl.contents[ii][13] = strdup(off); } if(DEVNULL_HAS_PRIV(th, OPME)) { tbl.contents[ii][14] = on; @@ -4398,8 +4399,8 @@ static MODCMD_FUNC(cmd_listdevnull) } } table_send(cmd->parent->bot, user->nick, 0, NULL, tbl); - for(ii = 1; ii < tbl.length; ++ii) - { + for(ii = 1; ii < tbl.length; ++ii) { + free(tbl.contents[ii][13]); free(tbl.contents[ii]); } free(tbl.contents[0]);