From 84a3275b7a9b9e02886efd932447dbff30221c52 Mon Sep 17 00:00:00 2001 From: Simon Arlott Date: Sat, 5 Aug 2017 12:29:52 +0100 Subject: [PATCH] ircd: log command in mod_add_cmd/mod_del_cmd error scenarios --- ircd/parse.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ircd/parse.c b/ircd/parse.c index bed65f19..250424bf 100644 --- a/ircd/parse.c +++ b/ircd/parse.c @@ -294,6 +294,7 @@ mod_add_cmd(struct Message *msg) return; if (rb_dictionary_find(cmd_dict, msg->cmd) != NULL) { + ilog(L_MAIN, "Add command: %s already exists", msg->cmd); s_assert(0); return; } @@ -318,8 +319,10 @@ mod_del_cmd(struct Message *msg) if(msg == NULL) return; - if (rb_dictionary_delete(cmd_dict, msg->cmd) == NULL) + if (rb_dictionary_delete(cmd_dict, msg->cmd) == NULL) { + ilog(L_MAIN, "Delete command: %s not found", msg->cmd); s_assert(0); + } } /* cancel_clients()