aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_console.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_console.lua')
-rw-r--r--plugins/mod_console.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua
index a3ed9499..b3963d6c 100644
--- a/plugins/mod_console.lua
+++ b/plugins/mod_console.lua
@@ -359,10 +359,19 @@ end
function def_env.c2s:show(match_jid)
local print, count = self.session.print, 0;
- show_c2s(function (jid)
+ show_c2s(function (jid, session)
if (not match_jid) or jid:match(match_jid) then
count = count + 1;
- print(jid);
+ local status, priority = "unavailable", tostring(session.priority or "-");
+ if session.presence then
+ status = session.presence:child_with_name("show");
+ if status then
+ status = status:get_text() or "[invalid!]";
+ else
+ status = "available";
+ end
+ end
+ print(jid.." - "..status.."("..priority..")");
end
end);
return true, "Total: "..count.." clients";