From b19e848a10fa32e979645c9ccfb787f953a60960 Mon Sep 17 00:00:00 2001 From: floogal <67554336+floogal@users.noreply.github.com> Date: Wed, 26 May 2021 20:56:29 +0100 Subject: [PATCH] Update message.py Made the 'warn' section in the database kick the player. It currently does nothing, not even filtering the message. --- houdini/handlers/play/message.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/houdini/handlers/play/message.py b/houdini/handlers/play/message.py index 01a2e0e..4157c4b 100644 --- a/houdini/handlers/play/message.py +++ b/houdini/handlers/play/message.py @@ -2,7 +2,7 @@ from houdini import handlers from houdini.commands import UnknownCommandException, has_command_prefix, invoke_command_string from houdini.data.moderator import ChatFilterRuleCollection from houdini.handlers import XTPacket -from houdini.handlers.play.moderation import moderator_ban +from houdini.handlers.play.moderation import moderator_ban, moderator_kick @handlers.boot @@ -32,7 +32,10 @@ async def handle_send_message(p, penguin_id: int, message: str): if consequence.ban: await moderator_ban(p, p.id, comment='Inappropriate language', message=message) return - if consequence.filter: + if consequence.warn: + await moderator_kick(p, p.id) + return + else: return try: