mirror of
https://github.com/solero/houdini.git
synced 2024-11-21 13:07:21 +00:00
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:
parent
76ffcd2dbc
commit
b19e848a10
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user