aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-09-09 14:35:41 +0100
committerMatthew Wild <mwild1@gmail.com>2009-09-09 14:35:41 +0100
commitafb7e49cbd10aabaf34629a407711310e0a2de07 (patch)
treedd65cd45bc135483b10cfe670113ed3c42f13b49
parent53a3a8df37fe39ac94fb98e9b655b23b4b11f9c7 (diff)
downloadprosody-afb7e49cbd10aabaf34629a407711310e0a2de07.tar.gz
prosody-afb7e49cbd10aabaf34629a407711310e0a2de07.zip
mod_console: c2s:show(): Group listed clients by host
-rw-r--r--plugins/mod_console.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua
index 367c46b8..c0f491de 100644
--- a/plugins/mod_console.lua
+++ b/plugins/mod_console.lua
@@ -373,7 +373,12 @@ end
function def_env.c2s:show(match_jid)
local print, count = self.session.print, 0;
+ local curr_host;
show_c2s(function (jid, session)
+ if curr_host ~= session.host then
+ curr_host = session.host;
+ print(curr_host);
+ end
if (not match_jid) or jid:match(match_jid) then
count = count + 1;
local status, priority = "unavailable", tostring(session.priority or "-");
@@ -385,7 +390,7 @@ function def_env.c2s:show(match_jid)
status = "available";
end
end
- print(jid.." - "..status.."("..priority..")");
+ print(" "..jid.." - "..status.."("..priority..")");
end
end);
return true, "Total: "..count.." clients";