aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_telnet.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-06-01 16:14:06 +0100
committerMatthew Wild <mwild1@gmail.com>2020-06-01 16:14:06 +0100
commite703759258ebed21e3a0aa5e55a163b22fd9d91b (patch)
tree7cb207b89ac26e400837e1bdfb471ca43a1853f8 /plugins/mod_admin_telnet.lua
parenta355440c01d5ece456bda9c5a4f302ec82929dff (diff)
downloadprosody-e703759258ebed21e3a0aa5e55a163b22fd9d91b.tar.gz
prosody-e703759258ebed21e3a0aa5e55a163b22fd9d91b.zip
mod_admin_shell, mod_admin_telnet, util.prosodyctl.shell: Separate output from final result
Fixes the client pausing for input after output from commands.
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r--plugins/mod_admin_telnet.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index ec8ff136..15220ec9 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -65,7 +65,7 @@ function console:new_session(conn)
local w = function(s) conn:write(s:gsub("\n", "\r\n")); end;
local session = { conn = conn;
send = function (t)
- if st.is_stanza(t) and t.name == "repl-result" then
+ if st.is_stanza(t) and (t.name == "repl-result" or t.name == "repl-output") then
t = "| "..t:get_text().."\n";
end
w(tostring(t));
@@ -106,7 +106,7 @@ function console:process_line(session, line)
session:disconnect();
return;
end
- return module:fire_event("admin/repl-line", { origin = session, stanza = st.stanza("repl"):text(line) });
+ return module:fire_event("admin/repl-input", { origin = session, stanza = st.stanza("repl-input"):text(line) });
end
local sessions = {};