aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl
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 /util/prosodyctl
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 'util/prosodyctl')
-rw-r--r--util/prosodyctl/shell.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/prosodyctl/shell.lua b/util/prosodyctl/shell.lua
index 0b84eaca..3e70e8f1 100644
--- a/util/prosodyctl/shell.lua
+++ b/util/prosodyctl/shell.lua
@@ -27,7 +27,7 @@ local function read_line()
end
local function send_line(client, line)
- client.send(st.stanza("repl-line"):text(line));
+ client.send(st.stanza("repl-input"):text(line));
end
local function repl(client)
@@ -103,9 +103,11 @@ local function start(arg) --luacheck: ignore 212/arg
end);
client.events.add_handler("received", function (stanza)
- if stanza.name == "repl-result" then
+ if stanza.name == "repl-output" or stanza.name == "repl-result" then
local result_prefix = stanza.attr.type == "error" and "!" or "|";
print(result_prefix.." "..stanza:get_text());
+ end
+ if stanza.name == "repl-result" then
repl(client);
end
end);