Changed initial look command (at login) to be called from at_post_login hook instead of from the default connect command, supposedly making it easier for those only wanting to change this one line rather than having to re-target connect. The player.at_post_login now also calls look in case no character is defined, for the cases when logging in without having a character selected. Resolves Issue 277.
This commit is contained in:
parent
97973dd5f9
commit
532cbc5fb6
3 changed files with 16 additions and 14 deletions
|
|
@ -90,18 +90,15 @@ class CmdUnconnectedConnect(MuxCommand):
|
|||
session.execute_cmd("quit")
|
||||
return
|
||||
|
||||
# actually do the login. This will call all hooks.
|
||||
# actually do the login. This will call all other hooks:
|
||||
# session.at_init()
|
||||
# if character:
|
||||
# at_first_login() # only once
|
||||
# at_pre_login()
|
||||
# player.at_post_login() - calls look if no character is set
|
||||
# character.at_post_login() - this calls look command by default
|
||||
session.session_login(player)
|
||||
|
||||
# we are logged in. Look around.
|
||||
character = player.character
|
||||
if character:
|
||||
character.execute_cmd("look")
|
||||
else:
|
||||
# we have no character yet; use player's look, if it exists
|
||||
player.execute_cmd("look")
|
||||
|
||||
|
||||
class CmdUnconnectedCreate(MuxCommand):
|
||||
"""
|
||||
Create a new account.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue