diff --git a/include/ignore.h b/include/ignore.h index 678de7e..26e10b0 100644 --- a/include/ignore.h +++ b/include/ignore.h @@ -57,7 +57,7 @@ int check_ignore (char *, char *, char *, long, char *); void ignore (char *, char *, char *, char *); void tignore (char *, char *, char *, char *); void ignore_nickname (char *, long, int); -long ignore_type (char *, int); +long ignore_type(const char *, size_t); int check_is_ignored(char *); char *get_ignores_by_pattern (char *patterns, int covered); int get_type_by_desc (char *type, int *do_mask, int *dont_mask); diff --git a/source/ignore.c b/source/ignore.c index 0c96ea3..ac0f2c8 100644 --- a/source/ignore.c +++ b/source/ignore.c @@ -571,11 +571,13 @@ static void ignore_list(char *nick) bitchsay("There are no nicknames or channels being ignored"); } -long ignore_type (char *type, int len) +long ignore_type(const char *type, size_t len) { -long ret = -1; + long ret = -1; + if (!type || !*type) return -1; + if (!strncmp(type, "ALL", len)) ret = IGNORE_ALL; else if (!strncmp(type, "MSGS", len))