diff options
-rw-r--r-- | plugins/mod_console.lua | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua index b5831df1..5e72cb09 100644 --- a/plugins/mod_console.lua +++ b/plugins/mod_console.lua @@ -160,15 +160,24 @@ function def_env.module:load(name, host, config) return true, "Module loaded";
end
-function def_env.module:unload(name, host)
- local mm = require "modulemanager";
- local ok, err = mm.unload(host or self.env.host, name);
- if not ok then
- return false, err or "Unknown error unloading module";
- end
- return true, "Module unloaded";
-end
-
+function def_env.module:unload(name, host) + local mm = require "modulemanager"; + local ok, err = mm.unload(host or self.env.host, name); + if not ok then + return false, err or "Unknown error unloading module"; + end + return true, "Module unloaded"; +end + +function def_env.module:reload(name, host) + local mm = require "modulemanager"; + local ok, err = mm.reload(host or self.env.host, name); + if not ok then + return false, err or "Unknown error reloading module"; + end + return true, "Module reloaded"; +end + def_env.config = {};
function def_env.config:load(filename, format)
local config_load = require "core.configmanager".load;
|