diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_console.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua index 8b123df4..b1dc263c 100644 --- a/plugins/mod_console.lua +++ b/plugins/mod_console.lua @@ -129,15 +129,24 @@ function def_env.server:reload() end
def_env.module = {};
-function def_env.module:load(name, host)
+function def_env.module:load(name, host, config)
local mm = require "modulemanager";
- local ok, err = mm.load(host or self.env.host, name);
+ local ok, err = mm.load(host or self.env.host, name, config);
if not ok then
return false, err or "Unknown error loading module";
end
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
+
def_env.config = {};
function def_env.config:load(filename, format)
local config_load = require "core.configmanager".load;
|