projects
/
srvx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
880457f
)
add offchannel to cmd_stats_services
author
Stricted
<info@nexus-irc.de>
Tue, 18 Dec 2012 22:48:10 +0000
(23:48 +0100)
committer
NurPech
<nurpech@nurpech.de>
Sun, 19 May 2013 15:58:07 +0000
(17:58 +0200)
src/modcmd.c
patch
|
blob
|
history
diff --git
a/src/modcmd.c
b/src/modcmd.c
index 4f861741ab0b3674c8622414cc99539c5fd9f190..bb3199fea23bba07c84938665c1f9db032406d7c 100644
(file)
--- a/
src/modcmd.c
+++ b/
src/modcmd.c
@@
-1598,7
+1598,7
@@
static MODCMD_FUNC(cmd_stats_services) {
if (argc < 2) {
tbl.length = dict_size(services) + 1;
if (argc < 2) {
tbl.length = dict_size(services) + 1;
- tbl.width =
4
;
+ tbl.width =
5
;
tbl.flags = TABLE_PAD_LEFT;
tbl.contents = calloc(tbl.length, sizeof(tbl.contents[0]));
tbl.contents[0] = calloc(tbl.width, sizeof(tbl.contents[0][0]));
tbl.flags = TABLE_PAD_LEFT;
tbl.contents = calloc(tbl.length, sizeof(tbl.contents[0]));
tbl.contents[0] = calloc(tbl.width, sizeof(tbl.contents[0][0]));
@@
-1606,6
+1606,7
@@
static MODCMD_FUNC(cmd_stats_services) {
tbl.contents[0][1] = "Commands";
tbl.contents[0][2] = "Priv'd?";
tbl.contents[0][3] = "Trigger";
tbl.contents[0][1] = "Commands";
tbl.contents[0][2] = "Priv'd?";
tbl.contents[0][3] = "Trigger";
+ tbl.contents[0][4] = "Offchannel";
extra = calloc(2, tbl.length);
for (ii=1, it=dict_first(services); it; it=iter_next(it), ii++) {
service = iter_data(it);
extra = calloc(2, tbl.length);
for (ii=1, it=dict_first(services); it; it=iter_next(it), ii++) {
service = iter_data(it);
@@
-1615,6
+1616,7
@@
static MODCMD_FUNC(cmd_stats_services) {
tbl.contents[ii][2] = service->privileged ? "yes" : "no";
extra[ii*2] = service->trigger;
tbl.contents[ii][3] = extra+ii*2;
tbl.contents[ii][2] = service->privileged ? "yes" : "no";
extra[ii*2] = service->trigger;
tbl.contents[ii][3] = extra+ii*2;
+ tbl.contents[ii][4] = offchannel_allowed[(unsigned char)service->trigger] ? "yes" : "no";
}
table_send(cmd->parent->bot, user->nick, 0, 0, tbl);
free(extra);
}
table_send(cmd->parent->bot, user->nick, 0, 0, tbl);
free(extra);