mod_admin_telnet: Reuse existing pretty printing setup
authorKim Alvefur <zash@zash.se>
Sat, 02 May 2020 20:37:49 +0200
changeset 10800 89d810a23ee0
parent 10799 4c90f06f2247
child 10801 1c61ef6a15ab
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.
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