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)
|
obj = caller.search(self.lhs)
|
||||||
if not obj:
|
if not obj:
|
||||||
return
|
return
|
||||||
caller.msg(obj.locks)
|
caller.msg(obj.locks.all())
|
||||||
|
|
||||||
|
|
||||||
class CmdExamine(ObjManipCommand):
|
class CmdExamine(ObjManipCommand):
|
||||||
|
|
|
||||||
|
|
@ -361,6 +361,16 @@ class LockHandler(object):
|
||||||
return self.locks.get(access_type, ["", "", ""])[2]
|
return self.locks.get(access_type, ["", "", ""])[2]
|
||||||
return str(self)
|
return str(self)
|
||||||
|
|
||||||
|
def all(self):
|
||||||
|
"""
|
||||||
|
Return all lockstrings.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
lockstring (str): The full lockstring
|
||||||
|
|
||||||
|
"""
|
||||||
|
return self.get()
|
||||||
|
|
||||||
def remove(self, access_type):
|
def remove(self, access_type):
|
||||||
"""
|
"""
|
||||||
Remove a particular lock from the handler
|
Remove a particular lock from the handler
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue