projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0630af
)
mod_console: Added support for multiple arguments to print().
author
Waqas Hussain
<waqas20@gmail.com>
Sun, 25 Jul 2010 19:59:26 +0000
(
00:59
+0500)
committer
Waqas Hussain
<waqas20@gmail.com>
Sun, 25 Jul 2010 19:59:26 +0000
(
00:59
+0500)
plugins/mod_console.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_console.lua
b/plugins/mod_console.lua
index e87ef536158cf39afb295406fcd929cdcc6dfa5a..20d04afe2f913e1b30c3d266c9c9cd74c79f96f9 100644
(file)
--- 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);