plugins/mod_console.lua

changeset 3404
33c81ee280e3
parent 3044
a6f89c72d305
child 3407
15f633285755
--- a/plugins/mod_console.lua	Mon Jul 26 00:58:19 2010 +0500
+++ b/plugins/mod_console.lua	Mon Jul 26 00:59:26 2010 +0500
@@ -36,7 +36,13 @@
 	local w = function(s) conn:write(s:gsub("\n", "\r\n")); end;
 	local session = { conn = conn;
 			send = function (t) w(tostring(t)); end;
-			print = function (t) w("| "..tostring(t).."\n"); end;
+			print = function (...)
+				local t = {};
+				for i=1,select("#", ...) do
+					t[i] = tostring(select(i, ...));
+				end
+				w("| "..table.concat(t, "\t").."\n");
+			end;
 			disconnect = function () conn:close(); end;
 			};
 	session.env = setmetatable({}, default_env_mt);

mercurial