User error when asking for commands for a module that does not exist

This commit is contained in:
moneromooo 2015-04-25 10:31:12 +01:00
parent dc96f38c08
commit 94c31f263f
1 changed files with 3 additions and 0 deletions

View File

@ -67,6 +67,9 @@ def Commands(link,cmd):
module_name = GetParam(cmd,1)
if module_name:
if not module_name in modules:
link.send_private("%s is not a module, see module list with !commands" % module_name)
return
link.send_private("Commands for %s's %s module:" % (config.tipbot_name,module_name))
else:
link.send_private("Commands for %s (use !commands <modulename> for help about the module's commands):" % config.tipbot_name)