From 384e3dbea2738e2c9b0c515fb865f1d07fda179e Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 13 Mar 2025 11:35:39 +0000 Subject: mod_admin_shell: Remove outdated help text (fixes #1898) The ! commands have been broken for some time, and we're not going to implement them right now. If we want fancier editing, we can now do that on the client side (with readline and stuff). Also removes mention of telnet! --- plugins/mod_admin_shell.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index b88b5316..892844ff 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -92,13 +92,8 @@ end -- Seed with default sections and their description text help_topic "console" "Help regarding the console itself" [[ Hey! Welcome to Prosody's admin console. -First thing, if you're ever wondering how to get out, simply type 'quit'. -Secondly, note that we don't support the full telnet protocol yet (it's coming) -so you may have trouble using the arrow keys, etc. depending on your system. - -For now we offer a couple of handy shortcuts: -!! - Repeat the last command -!old!new! - repeat the last command, but with 'old' replaced by 'new' +If you're ever wondering how to get out, simply type 'quit' (ctrl+d should also +work). For those well-versed in Prosody's internals, or taking instruction from those who are, you can prefix a command with > to escape the console sandbox, and access everything in -- cgit v1.2.3 From 57d168dd5e2684522df3c268be482430f3682e2b Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 13 Mar 2025 11:37:11 +0000 Subject: prosodyctl shell: More reliable detection of REPL/interactive mode (fixes #1895) --- plugins/mod_admin_shell.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua index 892844ff..28d758d0 100644 --- a/plugins/mod_admin_shell.lua +++ b/plugins/mod_admin_shell.lua @@ -342,6 +342,8 @@ local function handle_line(event) local line = event.stanza:get_text(); local useglobalenv; + session.repl = event.stanza.attr.repl ~= "0"; + local result = st.stanza("repl-result"); if line:match("^>") then @@ -422,10 +424,6 @@ local function handle_line(event) end end - if not source then - session.repl = true; - end - taskok, message = chunk(flags); if promise.is_promise(taskok) then -- cgit v1.2.3