aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_admin_shell.lua1
-rw-r--r--plugins/mod_admin_socket.lua7
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua
index dda35f08..e1016425 100644
--- a/plugins/mod_admin_shell.lua
+++ b/plugins/mod_admin_shell.lua
@@ -198,6 +198,7 @@ module:hook("admin/repl-input", function (event)
if not ok then
event.origin.send(st.stanza("repl-result", { type = "error" }):text(err));
end
+ return true;
end);
-- Console commands --
diff --git a/plugins/mod_admin_socket.lua b/plugins/mod_admin_socket.lua
index c4e1d260..157e746c 100644
--- a/plugins/mod_admin_socket.lua
+++ b/plugins/mod_admin_socket.lua
@@ -19,6 +19,7 @@ end
local server = require "net.server";
local adminstream = require "util.adminstream";
+local st = require "util.stanza";
local socket_path = module:get_option_path("admin_socket", "prosody.sock", "data");
@@ -35,7 +36,11 @@ local function fire_admin_event(session, stanza)
event_name = "admin/"..stanza.name;
end
module:log("debug", "Firing %s", event_name);
- return module:fire_event(event_name, event_data);
+ local ret = module:fire_event(event_name, event_data);
+ if ret == nil then
+ session.send(st.stanza("repl-result", { type = "error" }):text("No module handled this query. Is mod_admin_shell enabled?"));
+ end
+ return ret;
end
module:hook("server-stopping", function ()