mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 14:07:16 +02:00
Cleaned up all commands of the player type to correctly relay their msg-data only to their assigned session.
This commit is contained in:
parent
a6544f2848
commit
b58a464409
4 changed files with 43 additions and 44 deletions
|
|
@ -1657,8 +1657,10 @@ class TypedObject(SharedMemoryModel):
|
|||
This explicitly checks if we hold particular permission without involving
|
||||
any locks.
|
||||
"""
|
||||
if self.player and self.player.is_superuser:
|
||||
return True
|
||||
if hasattr(self, "player"):
|
||||
if self.player and self.player.is_superuser: return True
|
||||
else:
|
||||
if self.is_superuser: return True
|
||||
|
||||
if not permstring:
|
||||
return False
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ _DA = object.__delattr__
|
|||
# to *in-game* safety (if you can edit typeclasses you have
|
||||
# full access anyway), so no protection against changing
|
||||
# e.g. 'locks' or 'permissions' should go here.
|
||||
PROTECTED = ('id', 'dbobj', 'db', 'ndb', 'objects', 'typeclass',
|
||||
PROTECTED = ('id', 'dbobj', 'db', 'ndb', 'objects', 'typeclass', 'db_player', 'player',
|
||||
'attr', 'save', 'delete', 'db_model_name','attribute_class',
|
||||
'typeclass_paths')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue