Added a check for multiple connected sessions to avoid moving disconnected object more than once. Resolves issue 145.

This commit is contained in:
Griatch 2011-03-19 22:17:00 +00:00
parent 8288534cf6
commit 2f78bacd97
6 changed files with 26 additions and 19 deletions

View file

@ -113,9 +113,10 @@ class Character(BaseCharacter):
We stove away the character when logging off, otherwise they will remain where
they are, 'headless', so to say.
"""
self.location.msg_contents("%s has left the game." % self.name)
self.db.prelogout_location = self.location
self.location = None
if self.location: # have to check, in case of multiple connections
self.location.msg_contents("%s has left the game." % self.name)
self.db.prelogout_location = self.location
self.location = None
def at_post_login(self):
"""