--- a/plugins/mod_console.lua Sat Jul 18 15:33:16 2009 +0100
+++ b/plugins/mod_console.lua Sat Jul 18 15:34:36 2009 +0100
@@ -160,6 +160,7 @@
-- Anything in def_env will be accessible within the session as a global variable
def_env.server = {};
+
function def_env.server:insane_reload()
prosody.unlock_globals();
dofile "prosody"
@@ -288,6 +289,11 @@
return true, tostring(config_get(host, section, key));
end
+function def_env.config:reload()
+ local ok, err = prosody.reload_config();
+ return ok, (ok and "Config reloaded (you may need to reload modules to take effect)") or tostring(err);
+end
+
def_env.hosts = {};
function def_env.hosts:list()
for host, host_session in pairs(hosts) do