Diff

plugins/mod_admin_shell.lua @ 13771:5f26164c738f

Merge 13.0->trunk
author Matthew Wild <mwild1@gmail.com>
date Thu, 13 Mar 2025 11:41:32 +0000
parent 13770:a28349b8a387
child 13796:c8e534b4f2e2
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua	Tue Mar 11 18:45:23 2025 +0000
+++ b/plugins/mod_admin_shell.lua	Thu Mar 13 11:41:32 2025 +0000
@@ -92,13 +92,8 @@
 -- 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
@@ -347,6 +342,8 @@
 	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
@@ -427,10 +424,6 @@
 		end
 	end
 
-	if not source then
-		session.repl = true;
-	end
-
 	taskok, message = chunk(flags);
 
 	if promise.is_promise(taskok) then