diff --git a/main.py b/main.py index 04523c5..2b051e1 100644 --- a/main.py +++ b/main.py @@ -30,7 +30,7 @@ def on_disable(): log("Loading RedstonerUtils...") # Import all modules, in this order -load_modules = [ +shared["load_modules"] = [ "misc", "adminchat", "lagchunks", @@ -46,7 +46,7 @@ load_modules = [ "forcefield" ] shared["modules"] = {} -for module in load_modules: +for module in shared["load_modules"]: try: shared["modules"][module] = __import__(module) log("Module %s loaded." % module) diff --git a/misc.py b/misc.py index 3ea3996..878bb5b 100644 --- a/misc.py +++ b/misc.py @@ -143,3 +143,11 @@ def on_pyeval_command(sender, args): else: noperm(sender) return True + + +@hook.command("modules") +def on_modules_command(sender, args): + plugin_header("Modules") + for mod in shared["load_modules"]: + color = "a" if mod in shared["modules"] else "c" + msg(sender, "&" + color + mod) \ No newline at end of file