# HG changeset patch # User Kim Alvefur # Date 1588444773 -7200 # Node ID 1c61ef6a15ab4948f0b2eac947dabba6867b1586 # Parent 89d810a23ee08d427a7e0fdf9136ed8aca8ec9f5 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 `>`. diff -r 89d810a23ee0 -r 1c61ef6a15ab plugins/mod_admin_telnet.lua --- 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 = {};