Merge pull request #55 from DanLCD/patch-1

Lower-case filter words automatically.
This commit is contained in:
AllinolCP 2021-10-28 17:23:58 +07:00 committed by GitHub
commit 962a0eee21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,7 +7,7 @@ from houdini.handlers.play.moderation import moderator_ban, moderator_kick
@handlers.boot @handlers.boot
async def filter_load(server): 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') server.logger.info(f'Loaded {len(server.chat_filter_words)} filter words')