Moved disabled commands around.

This commit is contained in:
rainyday 2010-11-22 16:03:32 +08:00 committed by rmmh
parent 4d0d730a75
commit 83a94fe75f
1 changed files with 2 additions and 1 deletions

View File

@ -9,10 +9,11 @@ def help(inp, bot=None, pm=None):
funcs = {} funcs = {}
disabled = bot.config.get('disabled_plugins', []) disabled = bot.config.get('disabled_plugins', [])
disabled_comm = bot.config.get('disabled_commands', [])
for command, (func, args) in bot.commands.iteritems(): for command, (func, args) in bot.commands.iteritems():
fn = re.match(r'^plugins.(.+).py$', func._filename) fn = re.match(r'^plugins.(.+).py$', func._filename)
if fn.group(1).lower() not in disabled: if fn.group(1).lower() not in disabled:
if command not in bot.config.get('disabled_commands', []): if command not in disabled_comm:
if func.__doc__ is not None: if func.__doc__ is not None:
if func in funcs: if func in funcs:
if len(funcs[func]) < len(command): if len(funcs[func]) < len(command):