Software /
code /
prosody
Diff
plugins/mod_admin_telnet.lua @ 10859:8de0057b4279
mod_admin_shell, mod_admin_telnet, util.prosodyctl.shell: Separate output from final result
Fixes the client pausing for input after output from commands.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 01 Jun 2020 16:14:06 +0100 |
parent | 10857:826023c3322b |
child | 12977:74b9e05af71e |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Mon Jun 01 15:44:44 2020 +0100 +++ b/plugins/mod_admin_telnet.lua Mon Jun 01 16:14:06 2020 +0100 @@ -65,7 +65,7 @@ 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 @@ 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 = {};