]> jfr.im git - irc/charybdis-ircd/charybdis.git/commitdiff
ircd: log command in mod_add_cmd/mod_del_cmd error scenarios
authorSimon Arlott <sa.me.uk>
Sat, 5 Aug 2017 11:29:52 +0000 (12:29 +0100)
committerSimon Arlott <sa.me.uk>
Sat, 5 Aug 2017 11:29:52 +0000 (12:29 +0100)
ircd/parse.c

index bed65f1962a0af0eb8ef40ff2c237b30b1f3cc65..250424bfbfa21f835b46104eecf21368264469b2 100644 (file)
@@ -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()