diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-06-01 16:14:06 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-06-01 16:14:06 +0100 |
commit | cdeaa5882177f00e6eb3262c7428486874faab28 (patch) | |
tree | 7cb207b89ac26e400837e1bdfb471ca43a1853f8 /plugins/mod_admin_telnet.lua | |
parent | f9176ca0e930cd142df047178f9e585b56275ddf (diff) | |
download | prosody-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.lua | 4 |
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 = {}; |