projects
/
srvx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
91aeb56
)
show MAXSENDQ value in cmd_listdevnull
author
pk910
<philipp@zoelle1.de>
Tue, 27 Aug 2013 15:22:18 +0000
(17:22 +0200)
committer
pk910
<philipp@zoelle1.de>
Tue, 27 Aug 2013 15:22:18 +0000
(17:22 +0200)
src/opserv.c
patch
|
blob
|
history
diff --git
a/src/opserv.c
b/src/opserv.c
index ccede743d5fb9f1ff7b6677cfd83333ee3a48ba4..6c6ac33d6046cde0ca855c06e5836219779454a5 100644
(file)
--- 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";
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]);
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][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 {
} else {
- tbl.contents[ii][13] =
off
;
+ tbl.contents[ii][13] =
strdup(off)
;
}
if(DEVNULL_HAS_PRIV(th, OPME)) {
tbl.contents[ii][14] = on;
}
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);
}
}
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]);
free(tbl.contents[ii]);
}
free(tbl.contents[0]);