diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-01-13 22:39:07 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-01-13 22:39:07 +0500 |
commit | e9f048866981c889d8ad90e1ff6a0dae780d6014 (patch) | |
tree | 63fe37b5faa4600c637483f11f79324f65c34fd7 /plugins | |
parent | 53fd89fe983d974a391c066ae3b65c9295623d56 (diff) | |
download | prosody-e9f048866981c889d8ad90e1ff6a0dae780d6014.tar.gz prosody-e9f048866981c889d8ad90e1ff6a0dae780d6014.zip |
mod_console: Added module:reload
Diffstat (limited to 'plugins')
-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;
|