ircd: log command in mod_add_cmd/mod_del_cmd error scenarios

This commit is contained in:
Simon Arlott 2017-08-05 12:29:52 +01:00
parent 4212494106
commit 84a3275b7a
No known key found for this signature in database
GPG key ID: C8975F2043CA5D24

View 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,9 +319,11 @@ 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()
*