# HG changeset patch # User Kim Alvefur # Date 1588444669 -7200 # Node ID 89d810a23ee08d427a7e0fdf9136ed8aca8ec9f5 # Parent 4c90f06f22475acfa2c8cbc8483659977a1567b0 mod_admin_telnet: Reuse existing pretty printing setup Didn't do the configurable defaults thing here because I was going to do this, so that there's only one spot where it's done. diff -r 4c90f06f2247 -r 89d810a23ee0 plugins/mod_admin_telnet.lua --- a/plugins/mod_admin_telnet.lua Sat May 02 20:32:43 2020 +0200 +++ b/plugins/mod_admin_telnet.lua Sat May 02 20:37:49 2020 +0200 @@ -81,7 +81,7 @@ end w("| "..table.concat(t, "\t").."\n"); end; - serialize = serialization.new({ fatal = false, unquoted = true, maxdepth = 2}); + serialize = tostring; disconnect = function () conn:close(); end; }; session.env = setmetatable({}, default_env_mt); @@ -98,6 +98,8 @@ end end + session.env.output:configure(); + return session; end