- if not ctlmod.isloaded(args[0]):
- bot.msg(user, "%s is not loaded" % (args[0]))
+ module = None
+ autoload = False
+ force = False
+ for arg in args:
+ if arg[0] != "-":
+ if module is not None:
+ bot.msg(user, "Wrong number of arguments.")
+ return
+ module = arg
+ elif arg == "-autoload":
+ autoload = True
+ elif arg == "-force":
+ force = True
+ else:
+ bot.msg(user, "Bad option %s" % (arg))
+
+ if autoload:
+ bot.parent.cfg.delete('autoloads', module)
+ bot.msg(user, "Unmarked %s for autoloading." % (module))
+ if not ctlmod.isloaded(module):
+ bot.msg(user, "%s is not loaded" % (module))