From eac6143f284c1588f55e10f3b440dd67a4623714 Mon Sep 17 00:00:00 2001 From: JeffTheRock <84420756+JeffTheRock@users.noreply.github.com> Date: Sun, 10 May 2026 00:02:11 -0400 Subject: [PATCH] fix chat filtering and puffle item quantity oversights (#114) * fix chat filtering and puffle item quantity oversights if a word exists in the database with all parametres set to false, the current implementation will still fail. also adds red bubble messages for mods the limit for puffles is 75, thus there is no reason to own 100 puffle hats * fix consequence ordering --- houdini/handlers/play/message.py | 7 +++++-- houdini/handlers/play/pet.py | 15 +++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/houdini/handlers/play/message.py b/houdini/handlers/play/message.py index 0a9e48f..6646a6f 100644 --- a/houdini/handlers/play/message.py +++ b/houdini/handlers/play/message.py @@ -30,12 +30,15 @@ async def handle_send_message(p, penguin_id: int, message: str): if consequence is not None: if consequence.ban: + await p.room.send_xt('mm', message, p.id, f=lambda px: px.moderator) await moderator_ban(p, p.id, comment='Inappropriate language', message=message) return - if consequence.warn: + elif consequence.warn: + await p.room.send_xt('mm', message, p.id, f=lambda px: px.moderator) await moderator_kick(p, p.id) return - else: + elif consequence.filter: + await p.room.send_xt('mm', message, p.id, f=lambda px: px.moderator) return try: diff --git a/houdini/handlers/play/pet.py b/houdini/handlers/play/pet.py index 66320f1..39baba6 100644 --- a/houdini/handlers/play/pet.py +++ b/houdini/handlers/play/pet.py @@ -629,14 +629,17 @@ async def handle_add_puffle_care_item(p, item_id: int): if care_item_id in p.puffle_items: penguin_care_item = p.puffle_items[care_item_id] - if penguin_care_item.play_external == "superplay": + if care_item.play_external == "superplay": return await p.send_error(408) - if penguin_care_item.quantity >= 100: - if penguin_care_item.type == "head": - return await p.send_error(407) - else: - return await p.send_error(406) + max_quantity = 100 + error_code = 406 + if care_item.type == 'head': + max_quantity = 75 + error_code = 407 + + if penguin_care_item.quantity >= max_quantity: + return await p.send_error(error_code) await p.add_puffle_item(care_item)