aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/commands.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/commands.py b/modules/commands.py
index fbe4eb23..f7390ad4 100644
--- a/modules/commands.py
+++ b/modules/commands.py
@@ -147,12 +147,13 @@ class Module(ModuleManager.BaseModule):
min_args = hook.kwargs.get("min_args")
if min_args and len(args_split) < min_args:
- if "usage" in hook.kwargs:
+ usage = self._get_usage(hook)
+ if usage:
stderr.write("Not enough arguments, usage: %s %s" % (
- command, hook.kwargs["usage"])).send()
+ command, usage)).send()
else:
- stderr.write("Not enough arguments (minimum: %d)" % min_args
- ).send()
+ stderr.write("Not enough arguments (minimum: %d)" %
+ min_args).send()
else:
args = " ".join(args_split)
server = event["server"]