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
commitcdeaa5882177f00e6eb3262c7428486874faab28 (patch)
tree7cb207b89ac26e400837e1bdfb471ca43a1853f8 /plugins/mod_admin_telnet.lua
parentf9176ca0e930cd142df047178f9e585b56275ddf (diff)
downloadprosody-cdeaa5882177f00e6eb3262c7428486874faab28.tar.gz
prosody-cdeaa5882177f00e6eb3262c7428486874faab28.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 = {};