Better auto-logging/charcreate

This commit is contained in:
Howard Abrams 2025-05-18 17:06:09 -07:00
parent b1da084cca
commit 366917981d
2 changed files with 5 additions and 3 deletions

View file

@ -55,7 +55,7 @@ SEARCH_MULTIMATCH_TEMPLATE = " {number}-{name}{aliases}{info}\n"
CHARGEN_MENU = "world.chargen_menu" CHARGEN_MENU = "world.chargen_menu"
AUTO_CREATE_CHARACTER_WITH_ACCOUNT = False AUTO_CREATE_CHARACTER_WITH_ACCOUNT = False
AUTO_PUPPET_ON_LOGIN = True AUTO_PUPPET_ON_LOGIN = False
MAX_NR_CHARACTERS = 6 MAX_NR_CHARACTERS = 6
###################################################################### ######################################################################

View file

@ -137,15 +137,17 @@ class Account(ContribChargenAccount):
""" """
def at_post_login(self, session=None, **kwargs): def at_post_login(self, session=None, **kwargs):
super().at_post_login(session)
protocol_flags = self.attributes.get("_saved_protocol_flags", {}) protocol_flags = self.attributes.get("_saved_protocol_flags", {})
if session and protocol_flags: if session and protocol_flags:
session.update_flags(**protocol_flags) session.update_flags(**protocol_flags)
self._send_to_connect_channel(f"|G{self.key} connected|n")
try: try:
if not self.db._last_puppet:
raise RuntimeError("First time")
self.puppet_object(session, self.db._last_puppet) self.puppet_object(session, self.db._last_puppet)
except RuntimeError: except RuntimeError:
self.msg("Welcome, welcome. Let's begin by creating you a character.") self.msg("\n\nWelcome, welcome. Let's begin by creating you a character.")
self.execute_cmd("charcreate") self.execute_cmd("charcreate")