mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd: parse: add asserts for improper use of mod_add_cmd/mod_del_cmd
This commit is contained in:
parent
e8de2bfaf0
commit
5c317f1313
1 changed files with 5 additions and 2 deletions
|
@ -295,8 +295,10 @@ mod_add_cmd(struct Message *msg)
|
|||
if(msg == NULL)
|
||||
return;
|
||||
|
||||
if (rb_dictionary_find(cmd_dict, msg->cmd) != NULL)
|
||||
if (rb_dictionary_find(cmd_dict, msg->cmd) != NULL) {
|
||||
s_assert(0);
|
||||
return;
|
||||
}
|
||||
|
||||
msg->count = 0;
|
||||
msg->rcount = 0;
|
||||
|
@ -318,7 +320,8 @@ mod_del_cmd(struct Message *msg)
|
|||
if(msg == NULL)
|
||||
return;
|
||||
|
||||
rb_dictionary_delete(cmd_dict, msg->cmd);
|
||||
if (rb_dictionary_delete(cmd_dict, msg->cmd) == NULL)
|
||||
s_assert(0);
|
||||
}
|
||||
|
||||
/* cancel_clients()
|
||||
|
|
Loading…
Reference in a new issue