be explicit when a command has no help available

This commit is contained in:
jesopo 2019-09-17 16:27:35 +01:00
parent 98545a9fb4
commit ebe772a5a9

View file

@ -38,7 +38,11 @@ class Module(ModuleManager.BaseModule):
out = help out = help
if usage: if usage:
out += ". Usage: %s" % usage out += ". Usage: %s" % usage
if out:
event["stdout"].write("%s: %s" % (command, out)) event["stdout"].write("%s: %s" % (command, out))
else:
event["stderr"].write("No help for %s" % command)
else: else:
event["stdout"].write("I'm %s. use '%smodules' to list modules, " event["stdout"].write("I'm %s. use '%smodules' to list modules, "
"'%scommands <module>' to list commands and " "'%scommands <module>' to list commands and "