From bbaeca3bc319466f00d74cce8313a767de0ac646 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Wed, 25 Jan 2017 17:12:38 +1100 Subject: [PATCH] Allow INVITE and WALLOP floods to trigger auto-ignore Previously, INVITE and WALLOP were tracked for flooding, but if the flood triggered then the auto-ignore didn't happen. As far as I can tell, this was just an oversight. --- Changelog | 2 ++ source/flood.c | 16 ++-------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/Changelog b/Changelog index ab49528..735ffdc 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,7 @@ [Changes 1.2.2] +* Allow INVITE and WALLOP floods to trigger auto-ignore. (caf) + * Change $indextoword() so that the return value numbers the words from 0 rather than 1, to align with documentation and EPIC4/5. (caf) diff --git a/source/flood.c b/source/flood.c index 5145815..3db5f09 100644 --- a/source/flood.c +++ b/source/flood.c @@ -425,20 +425,8 @@ int BX_check_flooding(char *nick, enum flood_type type, char *line, char *channe tmp->flood = 1; if ((ret = do_hook(FLOOD_LIST, "%s %s %s %s", nick, flood_table[type].text, channel?channel:zero, line)) != 1) return ret; - switch(type) - { - case WALL_FLOOD: - case MSG_FLOOD: - case NOTICE_FLOOD: - case CDCC_FLOOD: - case CTCP_FLOOD: - case CTCP_ACTION_FLOOD: - if (flood_prot(nick, FromUserHost, type, get_int_var(IGNORE_TIME_VAR), channel)) - return 0; - break; - default: /* INVITE_FLOOD and WALLOP_FLOOD - not clear if this is intentional */ - break; - } + if (flood_prot(nick, FromUserHost, type, get_int_var(IGNORE_TIME_VAR), channel)) + return 0; if (get_int_var(FLOOD_WARNING_VAR)) put_it("%s", convert_output_format(fget_string_var(FORMAT_FLOOD_FSET), "%s %s %s %s %s", update_clock(GET_TIME), flood_table[type].text, nick, FromUserHost, channel?channel:"unknown")); }