Update message.py

Made the 'warn' section in the database kick the player. It currently does nothing, not even filtering the message.
This commit is contained in:
floogal 2021-05-26 20:56:29 +01:00 committed by GitHub
parent 76ffcd2dbc
commit b19e848a10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: