From 44f6c00289f6231533829caec1964f43174b0fd6 Mon Sep 17 00:00:00 2001 From: Thorsten Date: Sun, 3 Jan 2016 13:30:18 +0100 Subject: [PATCH] fix remaining --- plugins/__init__.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/__init__.py b/plugins/__init__.py index 364ae69..eaff684 100644 --- a/plugins/__init__.py +++ b/plugins/__init__.py @@ -142,11 +142,11 @@ def command_help(argv, **args): @pluginfunction('plugin', "'disable' or 'enable' plugins", ptypes_COMMAND) def command_plugin_activation(argv, **args): - if argv[0] != 'plugin' or len(argv) == 1: + if not argv: return - command = argv[1] - plugin = argv[2] if len(argv) > 2 else None + command = argv[0] + plugin = argv[1] if len(argv) > 1 else None if command not in ('enable', 'disable'): return @@ -179,8 +179,6 @@ def command_plugin_activation(argv, **args): @pluginfunction('list', 'list plugin and parser status', ptypes_COMMAND) def command_list(argv, **args): - if 'list' != argv[0]: - return log.info('list plugin called') @@ -189,7 +187,7 @@ def command_list(argv, **args): 'msg': args['reply_user'] + ": both 'enabled' and 'disabled' makes no sense" } - # if not given, asume both + # if not given, assume both if 'command' not in argv and 'parser' not in argv: argv.append('command') argv.append('parser')