mirror of
https://github.com/evennia/evennia.git
synced 2026-03-31 13:07:16 +02:00
After the rework of the many-char mode, mode 0 now works stably and auto-logins correctly it seems.
This commit is contained in:
parent
26ced2cb90
commit
1e07b8ca34
8 changed files with 29 additions and 171 deletions
|
|
@ -61,7 +61,8 @@ def create_objects():
|
|||
|
||||
god_character.save()
|
||||
god_character.set_attribute("_superuser_character", True)
|
||||
god_character.set_attribute("_first_login", True)
|
||||
god_player.set_attribute("_first_login", True)
|
||||
god_player.set_attribute("_last_puppet", god_character)
|
||||
|
||||
# Limbo is the default "nowhere" starting room
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ class ServerSession(Session):
|
|||
through their session.
|
||||
|
||||
"""
|
||||
def __init__(self):
|
||||
"Initiate to avoid AttributeErrors down the line"
|
||||
self.puppet = None
|
||||
|
||||
def at_sync(self):
|
||||
"""
|
||||
This is called whenever a session has been resynced with the portal.
|
||||
|
|
@ -62,7 +66,7 @@ class ServerSession(Session):
|
|||
self.cmdset_storage = [settings.CMDSET_UNLOGGEDIN]
|
||||
self.cmdset.update(init_mode=True)
|
||||
elif self.puid:
|
||||
self.puppet = None
|
||||
# reconnect puppet (puid is only set if we are coming back from a server reload)
|
||||
obj = _ObjectDB.objects.get(id=self.puid)
|
||||
self.player.puppet_object(self.sessid, obj, normal_mode=False)
|
||||
|
||||
|
|
@ -92,7 +96,6 @@ class ServerSession(Session):
|
|||
if self.logged_in:
|
||||
sessid = self.sessid
|
||||
player = self.player
|
||||
print "session at_disconnect", self
|
||||
_GA(player.dbobj, "unpuppet_object")(sessid)
|
||||
uaccount = _GA(player.dbobj, "user")
|
||||
uaccount.last_login = datetime.now()
|
||||
|
|
|
|||
|
|
@ -212,7 +212,6 @@ class ServerSessionHandler(SessionHandler):
|
|||
now should know is connected to it. After this point we
|
||||
assume the session to be logged in one way or another.
|
||||
"""
|
||||
# prep the session with player/user info
|
||||
|
||||
# we have to check this first before uid has been assigned
|
||||
# this session.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue