From 524aa2803ed5dfa330b45ff03e77db99e43a230d Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 14 Feb 2020 21:50:08 +0000 Subject: [PATCH] Moderators and characters always have full badges --- houdini/handlers/play/player.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/houdini/handlers/play/player.py b/houdini/handlers/play/player.py index 49a55d1..61f65e4 100644 --- a/houdini/handlers/play/player.py +++ b/houdini/handlers/play/player.py @@ -1,7 +1,6 @@ from houdini import handlers from houdini.converters import SeparatorConverter -from houdini.handlers import XTPacket -from houdini.handlers.play.navigation import handle_join_server +from houdini.handlers import XTPacket, XMLPacket, Priority from houdini.data import db from houdini.data.penguin import Penguin, PenguinMembership from houdini.data.mail import PenguinPostcard @@ -86,14 +85,15 @@ MemberWarningPostcardsLegacy = [163] MemberExpiredPostcard = 124 MemberStartPostcardVanilla = 121 MemberStartPostcardLegacy = 164 +FullBadgeAge = 25 * 30 -@handlers.handler(XTPacket('j', 'js'), pre_login=True, before=handle_join_server) +@handlers.handler(XMLPacket('login'), priority=Priority.Low) @handlers.allow_once -async def handle_setup_membership(p): +async def setup_membership(p): if not p.server.config.expire_membership or p.moderator or p.character: p.is_member = True - p.membership_days_total = p.age + p.membership_days_total = FullBadgeAge if p.moderator or p.character else p.age return membership_history = PenguinMembership.query.where(PenguinMembership.penguin_id == p.id)