aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-08-15 16:36:00 +0200
committerKim Alvefur <zash@zash.se>2022-08-15 16:36:00 +0200
commit1fac00b2affd58bcfbe47347280a406eccefb805 (patch)
tree3630703af1d71b175fde36499792306805a3bf94
parentae3a89375d7dcb1df54c072ddebe2a60248c58b0 (diff)
downloadprosody-1fac00b2affd58bcfbe47347280a406eccefb805.tar.gz
prosody-1fac00b2affd58bcfbe47347280a406eccefb805.zip
mod_admin_shell: Show session role in c2s:show
-rw-r--r--plugins/mod_admin_shell.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua
index 84ae0f72..bf682979 100644
--- a/plugins/mod_admin_shell.lua
+++ b/plugins/mod_admin_shell.lua
@@ -943,6 +943,15 @@ available_columns = {
end
end
};
+ role = {
+ title = "Role";
+ description = "Session role";
+ width = 20;
+ key = "role";
+ mapper = function(role)
+ return role.name;
+ end;
+ }
};
local function get_colspec(colspec, default)
@@ -963,7 +972,7 @@ end
function def_env.c2s:show(match_jid, colspec)
local print = self.session.print;
- local columns = get_colspec(colspec, { "id"; "jid"; "ipv"; "status"; "secure"; "smacks"; "csi" });
+ local columns = get_colspec(colspec, { "id"; "jid"; "role"; "ipv"; "status"; "secure"; "smacks"; "csi" });
local row = format_table(columns, self.session.width);
local function match(session)