summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/parse.h1
-rw-r--r--src/parse.c6
2 files changed, 6 insertions, 1 deletions
diff --git a/include/parse.h b/include/parse.h
index 4f00054..607233e 100644
--- a/include/parse.h
+++ b/include/parse.h
@@ -149,6 +149,7 @@ struct Message
#define MFLG_SLOW 0x001 /* Command can be executed roughly
* once per 2 seconds.
*/
+#define MFLG_HIDDEN 0x002
#define MAXPARA 15
extern void parse(struct Client *, char *, char *);
diff --git a/src/parse.c b/src/parse.c
index 447dcd2..fdc2da3 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -524,10 +524,14 @@ recurse_report_messages(struct Client *source_p, const struct MessageTree *mtree
unsigned int i;
if (mtree->msg != NULL)
- sendto_one(source_p, form_str(RPL_STATSCOMMANDS),
+ {
+ if (!(mtree->msg->flags & MFLG_HIDDEN) ||
+ HasUMode(source_p, UMODE_ADMIN))
+ sendto_one(source_p, form_str(RPL_STATSCOMMANDS),
me.name, source_p->name, mtree->msg->cmd,
mtree->msg->count, mtree->msg->bytes,
mtree->msg->rcount);
+ }
for (i = 0; i < MAXPTRLEN; ++i)
if (mtree->pointers[i] != NULL)