From: John Runyon Date: Wed, 4 Oct 2023 07:22:09 +0000 (-0600) Subject: control - use new flag-style options in error messages X-Git-Url: https://jfr.im/git/erebus.git/commitdiff_plain/c07e4b02653fe75ef34524e2914f4c1756630cad control - use new flag-style options in error messages --- diff --git a/modules/control.py b/modules/control.py index 2e3dafb..58f2d94 100644 --- a/modules/control.py +++ b/modules/control.py @@ -68,12 +68,12 @@ def modunload(bot, user, chan, realtarget, *args): for arg in args: if arg[0] != "-": if module is not None: - bot.msg(user, "Wrong number of arguments.") + bot.msg(user, "Incorrect syntax - can only name one module") return module = arg - elif arg == "-autoload": + elif arg.lower() == "-autoload": autoload = True - elif arg == "-force": + elif arg.lower() == "-force": force = True else: bot.msg(user, "Bad option %s" % (arg)) @@ -86,7 +86,7 @@ def modunload(bot, user, chan, realtarget, *args): return if len(ctlmod.dependents[module]) > 0: if not force: - bot.msg(user, "That module has dependents! Say MODUNLOAD %s FORCE to unload it and any dependents." % (module)) + bot.msg(user, "That module has dependents! Say MODUNLOAD -force %s to unload it and any dependents." % (module)) return okay = ctlmod.unload(bot.parent, module)