Fix how the lock command returns strings to avoid a malformed AMP send. This (again fixes ##996.

This commit is contained in:
Griatch 2016-06-15 20:02:32 +02:00
parent 15036e8069
commit 1a30079fd4
2 changed files with 11 additions and 1 deletions

View file

@ -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):

View file

@ -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