diff options
-rw-r--r-- | src/irc/flood/autoignore.c | 10 | ||||
-rw-r--r-- | src/irc/flood/flood.c | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/irc/flood/autoignore.c b/src/irc/flood/autoignore.c index 3df4228d..83f4da68 100644 --- a/src/irc/flood/autoignore.c +++ b/src/irc/flood/autoignore.c @@ -235,6 +235,8 @@ static void autoignore_remove_level(const char *nick, int level) AUTOIGNORE_REC *rec; GSList *tmp; + g_return_if_fail(nick != NULL); + for (tmp = servers; tmp != NULL; tmp = tmp->next) { IRC_SERVER_REC *server = tmp->data; @@ -248,18 +250,20 @@ static void autoignore_remove_level(const char *nick, int level) static void sig_ignore_destroyed(IGNORE_REC *ignore) { - autoignore_remove_level(ignore->mask, MSGLEVEL_ALL); + if (ignore->mask != NULL) + autoignore_remove_level(ignore->mask, MSGLEVEL_ALL); } static void sig_ignore_changed(IGNORE_REC *ignore) { - autoignore_remove_level(ignore->mask, ~ignore->level); + if (ignore->mask != NULL) + autoignore_remove_level(ignore->mask, ~ignore->level); } void autoignore_init(void) { settings_add_int("flood", "autoignore_time", 300); - settings_add_str("flood", "autoignore_levels", "ctcps"); + settings_add_str("flood", "autoignore_levels", ""); ignore_tag = g_timeout_add(AUTOIGNORE_TIMECHECK, (GSourceFunc) autoignore_timeout, NULL); diff --git a/src/irc/flood/flood.c b/src/irc/flood/flood.c index c66a02d2..87cb2966 100644 --- a/src/irc/flood/flood.c +++ b/src/irc/flood/flood.c @@ -256,7 +256,6 @@ static void read_settings(void) signal_add("event privmsg", (SIGNAL_FUNC) flood_privmsg); signal_add("event notice", (SIGNAL_FUNC) flood_notice); signal_add("ctcp msg", (SIGNAL_FUNC) flood_ctcp); - signal_add("ctcp reply", (SIGNAL_FUNC) flood_ctcp); } } @@ -283,7 +282,6 @@ void irc_flood_deinit(void) signal_remove("event privmsg", (SIGNAL_FUNC) flood_privmsg); signal_remove("event notice", (SIGNAL_FUNC) flood_notice); signal_remove("ctcp msg", (SIGNAL_FUNC) flood_ctcp); - signal_remove("ctcp reply", (SIGNAL_FUNC) flood_ctcp); } signal_remove("setup changed", (SIGNAL_FUNC) read_settings); |