Add lockhandler.append to update lock string
This commit is contained in:
parent
a16e8894b3
commit
0967c9f668
3 changed files with 50 additions and 10 deletions
|
|
@ -3002,7 +3002,10 @@ class CmdSpawn(COMMAND_DEFAULT_CLASS):
|
|||
|
||||
# all seems ok. Try to save.
|
||||
try:
|
||||
save_db_prototype(caller, key, prototype, desc=desc, tags=tags, locks=lockstring)
|
||||
prot = save_db_prototype(caller, key, prototype, desc=desc, tags=tags, locks=lockstring)
|
||||
prot.locks.append("edit", "perm(Admin)")
|
||||
if not prot.locks.get("use"):
|
||||
prot.locks.add("use:all()")
|
||||
except PermissionError as err:
|
||||
caller.msg("|rError saving:|R {}|n".format(err))
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue