diff --git a/contrib/extended_room.py b/contrib/extended_room.py index 1ec2495e3f..db576991c0 100644 --- a/contrib/extended_room.py +++ b/contrib/extended_room.py @@ -43,7 +43,7 @@ The Extended Room can be "detailed" with special keywords. This makes use of a special Look command. Details are "virtual" targets to look at, without there having to be a database object created for it. The Details are simply stored in a dictionary on the room and if the look -command cannot find an object match for a a "look " command it +command cannot find an object match for a "look " command it will also look through the available details at the current location if applicable. An extended @desc command is used to set details. @@ -119,7 +119,7 @@ class ExtendedRoom(Room): def get_time_and_season(self): """ - Calcualte the current time and season ids + Calculate the current time and season ids """ # get the current time as parts of year and parts of day time = gametime.gametime(format=True) # returns a tuple (years,months,weeks,days,hours,minutes,sec) diff --git a/src/commands/default/player.py b/src/commands/default/player.py index c0889b7316..603c52c1b5 100644 --- a/src/commands/default/player.py +++ b/src/commands/default/player.py @@ -616,6 +616,7 @@ class CmdQuell(MuxPlayerCommand): # we are already puppeting an object. We need to reset the lock caches # (otherwise the superuser status change won't be visible until repuppet) char.locks.reset() + player.locks.reset() def func(self): "Perform the command" diff --git a/src/locks/lockhandler.py b/src/locks/lockhandler.py index 923ad8d7a7..2119d8ff3f 100644 --- a/src/locks/lockhandler.py +++ b/src/locks/lockhandler.py @@ -168,9 +168,7 @@ class LockHandler(object): self.obj = obj self.locks = {} self.log_obj = None - self.reset_flag = False - self._cache_locks(self.obj.lock_storage) - self.cache_lock_bypass(obj) + self.reset() def __str__(self): return ";".join(self.locks[key][2] for key in sorted(self.locks)) @@ -332,7 +330,8 @@ class LockHandler(object): Set the reset flag, so the the lock will be re-cached at next checking. This is usually set by @reload. """ - self.reset_flag = True + self._cache_locks(self.obj.lock_storage) + self.cache_lock_bypass(self.obj) def check(self, accessing_obj, access_type, default=False, no_superuser_bypass=False): """ @@ -362,12 +361,6 @@ class LockHandler(object): functions (as defined by your settings) are executed. """ - if self.reset_flag: - # rebuild cache, either directly or next call - self._cache_locks(self.obj.lock_storage) - self.reset_flag = False - self.cache_lock_bypass(self.obj) - try: # check if the lock should be bypassed (e.g. superuser status) if accessing_obj.locks.lock_bypass and not no_superuser_bypass: