From afb7e49cbd10aabaf34629a407711310e0a2de07 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 9 Sep 2009 14:35:41 +0100 Subject: mod_console: c2s:show(): Group listed clients by host --- plugins/mod_console.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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"; -- cgit v1.2.3