Fixed a bug that caused superuser status to be cached only once for characters, even if the player was not yet connected.

This commit is contained in:
Griatch 2013-03-11 20:01:03 +01:00
parent 29e313492f
commit bbdf2e0896
3 changed files with 17 additions and 15 deletions

View file

@ -256,6 +256,10 @@ class ObjectDB(TypedObject):
if inherits_from(player, TypeClass):
player = player.dbobj
set_field_cache(self, "player", player)
# we must set this here or superusers won't be able to
# bypass lockchecks unless they start the game connected
# to the character in question.
self.locks.cache_lock_bypass(self)
#@player.deleter
def __player_del(self):
"Deleter. Allows for del self.player"