diff options
author | Kim Alvefur <zash@zash.se> | 2020-05-02 20:39:33 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-05-02 20:39:33 +0200 |
commit | 4500aabbae173b93a9725de59acbd4f1b56696bb (patch) | |
tree | 17a84e2722d0d61ccc895cd3c295616608bad27f /plugins | |
parent | 5d387ccb3a43a2d027b2eba081c471486266fece (diff) | |
download | prosody-4500aabbae173b93a9725de59acbd4f1b56696bb.tar.gz prosody-4500aabbae173b93a9725de59acbd4f1b56696bb.zip |
mod_admin_telnet: Don't pretty-print the normal console stuff
Typing e.g. `c2s` would dump out a bunch of stuff that would probably
just confuse users.
Now you only get pretty-printing when poking around in the internals
with `>`.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_admin_telnet.lua | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 792f4f78..a5657d09 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -145,10 +145,10 @@ function console:process_line(session, line) local taskok, message = chunk(); if not message then - if type(taskok) ~= "string" then + if type(taskok) ~= "string" and useglobalenv then taskok = session.serialize(taskok); end - session.print("Result: "..taskok); + session.print("Result: "..tostring(taskok)); return; elseif (not taskok) and message then session.print("Command completed with a problem"); @@ -156,11 +156,7 @@ function console:process_line(session, line) return; end - if type(message) ~= "string" then - message = session.serialize(message); - end - - session.print("OK: "..message); + session.print("OK: "..tostring(message)); end local sessions = {}; |