From 698104441a53b261ed9192e0fe5c4dfc6902cd12 Mon Sep 17 00:00:00 2001 From: Daniel <44991848+Connor800@users.noreply.github.com> Date: Sat, 25 Jul 2020 17:44:05 -0500 Subject: [PATCH] Lower-case filter words automatically. It's never specified that words must be lower case, make it fool-proof. --- houdini/handlers/play/message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/houdini/handlers/play/message.py b/houdini/handlers/play/message.py index 01a2e0e..8a06c58 100644 --- a/houdini/handlers/play/message.py +++ b/houdini/handlers/play/message.py @@ -7,7 +7,7 @@ from houdini.handlers.play.moderation import moderator_ban @handlers.boot async def filter_load(server): - server.chat_filter_words = await ChatFilterRuleCollection.get_collection() + server.chat_filter_words = {w.lower(): c for w, c in await ChatFilterRuleCollection.get_collection().items()} server.logger.info(f'Loaded {len(server.chat_filter_words)} filter words')