aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_console.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_console.lua')
-rw-r--r--plugins/mod_console.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua
index 2246dbff..d505a2e2 100644
--- a/plugins/mod_console.lua
+++ b/plugins/mod_console.lua
@@ -160,6 +160,7 @@ end
-- 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 @@ function def_env.config:get(host, section, key)
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