mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 13:37:17 +02:00
Fix how the lock command returns strings to avoid a malformed AMP send. This (again fixes ##996.
This commit is contained in:
parent
15036e8069
commit
1a30079fd4
2 changed files with 11 additions and 1 deletions
|
|
@ -1805,7 +1805,7 @@ class CmdLock(ObjManipCommand):
|
|||
obj = caller.search(self.lhs)
|
||||
if not obj:
|
||||
return
|
||||
caller.msg(obj.locks)
|
||||
caller.msg(obj.locks.all())
|
||||
|
||||
|
||||
class CmdExamine(ObjManipCommand):
|
||||
|
|
|
|||
|
|
@ -361,6 +361,16 @@ class LockHandler(object):
|
|||
return self.locks.get(access_type, ["", "", ""])[2]
|
||||
return str(self)
|
||||
|
||||
def all(self):
|
||||
"""
|
||||
Return all lockstrings.
|
||||
|
||||
Returns:
|
||||
lockstring (str): The full lockstring
|
||||
|
||||
"""
|
||||
return self.get()
|
||||
|
||||
def remove(self, access_type):
|
||||
"""
|
||||
Remove a particular lock from the handler
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue