mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 23:47:16 +02:00
Added safety feature to lock handling.
This commit is contained in:
parent
0164574c00
commit
5800b960ff
2 changed files with 2 additions and 1 deletions
|
|
@ -48,6 +48,8 @@ def _init_command(mcs, **kwargs):
|
|||
if not hasattr(mcs, 'locks'):
|
||||
# default if one forgets to define completely
|
||||
mcs.locks = "cmd:all()"
|
||||
elif not "cmd:" in mcs.locks:
|
||||
mcs.locks = "cmd:all();" + mcs.locks
|
||||
for lockstring in mcs.locks.split(';'):
|
||||
if lockstring and not ':' in lockstring:
|
||||
lockstring = "cmd:%s" % lockstring
|
||||
|
|
|
|||
|
|
@ -911,7 +911,6 @@ class Exit(Object):
|
|||
# create an exit command.
|
||||
cmd = ExitCommand(key=exidbobj.db_key.strip().lower(),
|
||||
aliases=exidbobj.aliases,
|
||||
locks=str(exidbobj.locks),
|
||||
auto_help=False,
|
||||
destination=exidbobj.db_destination,
|
||||
obj=exidbobj)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue