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 `>`.
--- a/plugins/mod_admin_telnet.lua Sat May 02 20:37:49 2020 +0200
+++ b/plugins/mod_admin_telnet.lua Sat May 02 20:39:33 2020 +0200
@@ -145,10 +145,10 @@
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 @@
return;
end
- if type(message) ~= "string" then
- message = session.serialize(message);
- end
-
- session.print("OK: "..message);
+ session.print("OK: "..tostring(message));
end
local sessions = {};