Diff

plugins/mod_admin_telnet.lua @ 10796:89d810a23ee0

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.
author Kim Alvefur <zash@zash.se>
date Sat, 02 May 2020 20:37:49 +0200
parent 10795:4c90f06f2247
child 10797:1c61ef6a15ab
line wrap: on
line diff
--- 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