Added at_post_disconnect() hook to Player, to allow for clean deletion of players at disconnect (for example for Guest-account implementation)

This commit is contained in:
Griatch 2014-07-06 16:20:50 +02:00
parent 88efc50054
commit 1874300ad1
2 changed files with 12 additions and 0 deletions

View file

@ -123,6 +123,8 @@ class ServerSession(Session):
if not self.sessionhandler.sessions_from_player(player):
# no more sessions connected to this player
player.is_connected = False
# this may be used to e.g. delete player after disconnection etc
_GA(player.typeclass, "at_post_disconnect")()
def get_player(self):
"""