mirror of
https://github.com/evennia/evennia.git
synced 2026-04-08 09:24:37 +02:00
Checked at_init() due to reported issues of it not getting called. Couldn't find any problems, rather it was called too many times, so removed an unecessary call.
This commit is contained in:
parent
de9c2ec437
commit
f1d743f14c
3 changed files with 6 additions and 6 deletions
|
|
@ -85,6 +85,7 @@ class Object(TypeClass):
|
|||
the server without the players logging out), put it here.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
def basetype_posthook_setup(self):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -268,13 +268,12 @@ class AMPProtocol(amp.AMP):
|
|||
#print "serveradmin (server side):", sessid, operation, data
|
||||
|
||||
if operation == 'PCONN': #portal_session_connect
|
||||
# create a new, session and sync it
|
||||
# create a new session and sync it
|
||||
sess = ServerSession()
|
||||
sess.sessionhandler = self.factory.server.sessions
|
||||
sess.load_sync_data(data)
|
||||
if sess.logged_in and sess.uid:
|
||||
# this can happen in the case of auto-authenticating protocols like SSH
|
||||
|
||||
sess.player = PlayerDB.objects.get_player_from_uid(sess.uid)
|
||||
sess.at_sync() # this runs initialization without acr
|
||||
|
||||
|
|
@ -296,7 +295,6 @@ class AMPProtocol(amp.AMP):
|
|||
sess.load_sync_data(sessdict)
|
||||
if sess.uid:
|
||||
sess.player = PlayerDB.objects.get_player_from_uid(sess.uid)
|
||||
sess.at_sync()
|
||||
sesslist.append(sess)
|
||||
# replace sessions on server
|
||||
server_sessionhandler.portal_session_sync(sesslist)
|
||||
|
|
|
|||
|
|
@ -53,8 +53,10 @@ class ServerSession(Session):
|
|||
player = self.get_player()
|
||||
character = self.get_character()
|
||||
if player:
|
||||
#print "sync: at_init() - player"
|
||||
player.at_init()
|
||||
if character:
|
||||
#print "sync: at_init() - character"
|
||||
character.at_init()
|
||||
# start (persistent) scripts on this object
|
||||
ScriptDB.objects.validate(obj=character)
|
||||
|
|
@ -82,6 +84,7 @@ class ServerSession(Session):
|
|||
self.user.save()
|
||||
|
||||
# player init
|
||||
#print "at_init() - player"
|
||||
player.at_init()
|
||||
|
||||
# Check if this is the first time the *player* logs in
|
||||
|
|
@ -91,6 +94,7 @@ class ServerSession(Session):
|
|||
player.at_pre_login()
|
||||
|
||||
character = player.character
|
||||
#print "at_init() - character"
|
||||
character.at_init()
|
||||
if character:
|
||||
# this player has a character. Check if it's the
|
||||
|
|
@ -101,9 +105,6 @@ class ServerSession(Session):
|
|||
# run character login hook
|
||||
character.at_pre_login()
|
||||
|
||||
# this is always called first
|
||||
player.at_init()
|
||||
|
||||
self.log(_('Logged in: %(self)s') % {'self': self})
|
||||
|
||||
# start (persistent) scripts on this object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue