diff --git a/findspam.py b/findspam.py index 3281e2b591..2fbabb6cd4 100644 --- a/findspam.py +++ b/findspam.py @@ -26,7 +26,7 @@ from helpers import log, regex_compile_no_cache, strip_pre_and_code_elements, strip_code_elements, \ get_bookended_keyword_regex_text_from_entries, keyword_bookend_regex_text, KEYWORD_BOOKENDING_START, \ - get_non_bookended_keyword_regex_text_from_entries + get_non_bookended_keyword_regex_text_from_entries, chunk_list import metasmoke_cache from globalvars import GlobalVars import blacklists @@ -582,45 +582,46 @@ class FindSpam: ('warning', '**Very High** ', 30), # > 30 s: Log a "warning" and output to chat as bold "Very High" ] + @staticmethod + def _update_a_blacklist_dual_rule(rule_list, regex_text_generator, entries): + entries = list(entries) + entries_length = len(entries) + if entries_length > 100: + # Get the length to the 100 below the current length + chunk_length = int(str(entries_length)[:-2] + '00') + entries_lists = chunk_list(entries, chunk_length) + else: + # With <= 100 entries, Use an entries_lists with all the entries first, then a regex that can never match + entries_lists = [entries] + if len(entries_lists) == 1: + entries_lists.append = [r'q(?