Added safety feature to lock handling.

This commit is contained in:
Griatch 2013-07-02 09:34:35 +02:00
parent 0164574c00
commit 5800b960ff
2 changed files with 2 additions and 1 deletions

View file

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

View file

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