aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_console.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua
index e87ef536..20d04afe 100644
--- a/plugins/mod_console.lua
+++ b/plugins/mod_console.lua
@@ -36,7 +36,13 @@ function console:new_session(conn)
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);