Made it possible to "take" over puppeting from one's own stale sessions. Fixed a nasty bug in swap_typeclass.

This commit is contained in:
Griatch 2013-05-11 16:09:26 +02:00
parent ad8a9fbe69
commit be22a31ec4
3 changed files with 30 additions and 36 deletions

View file

@ -259,6 +259,7 @@ class LockHandler(object):
get_player method (this sits on serversessions, in some rare cases where a check is done
before the login process has yet been fully finalized)
"""
#print "_superuser_character:", hasattr(obj, "get_attribute") and obj.get_attribute("_superuser_character")
self.lock_bypass = (hasattr(obj, "is_superuser") and obj.is_superuser
or ((hasattr(obj, "get_attribute") and obj.get_attribute("_superuser_character"))
and ((hasattr(obj, "player") and hasattr(obj.player, "is_superuser") and obj.player.is_superuser)