Better auto-logging/charcreate
This commit is contained in:
parent
b1da084cca
commit
366917981d
2 changed files with 5 additions and 3 deletions
|
|
@ -55,7 +55,7 @@ SEARCH_MULTIMATCH_TEMPLATE = " {number}-{name}{aliases}{info}\n"
|
|||
|
||||
CHARGEN_MENU = "world.chargen_menu"
|
||||
AUTO_CREATE_CHARACTER_WITH_ACCOUNT = False
|
||||
AUTO_PUPPET_ON_LOGIN = True
|
||||
AUTO_PUPPET_ON_LOGIN = False
|
||||
MAX_NR_CHARACTERS = 6
|
||||
|
||||
######################################################################
|
||||
|
|
|
|||
|
|
@ -137,15 +137,17 @@ class Account(ContribChargenAccount):
|
|||
|
||||
"""
|
||||
def at_post_login(self, session=None, **kwargs):
|
||||
super().at_post_login(session)
|
||||
protocol_flags = self.attributes.get("_saved_protocol_flags", {})
|
||||
if session and protocol_flags:
|
||||
session.update_flags(**protocol_flags)
|
||||
|
||||
self._send_to_connect_channel(f"|G{self.key} connected|n")
|
||||
try:
|
||||
if not self.db._last_puppet:
|
||||
raise RuntimeError("First time")
|
||||
self.puppet_object(session, self.db._last_puppet)
|
||||
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")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue