lockhandler.get() returned on the wrong format. Now returns the lockstring as the API specifies. Resolves Issue 282.

This commit is contained in:
Griatch 2012-10-14 12:39:59 +02:00
parent 532cbc5fb6
commit d80daccb70
2 changed files with 6 additions and 5 deletions

View file

@ -1501,13 +1501,12 @@ class CmdLock(ObjManipCommand):
return
lockdef = obj.locks.get(access_type)
if lockdef:
string = lockdef[2]
if 'del' in self.switches:
if not obj.access(caller, 'control'):
caller.msg("You are not allowed to do that.")
return
obj.locks.delete(access_type)
string = "deleted lock %s" % string
string = "deleted lock %s" % lockdef
else:
string = "%s has no lock of access type '%s'." % (obj, access_type)
caller.msg(string)