# HG changeset patch # User Kim Alvefur # Date 1660574160 -7200 # Node ID e8f57970ced5e7cdb33ab8f0e0f5fba020443584 # Parent c0eea4f6c739838745c9ca939ac0a0d85df07a74 mod_admin_shell: Show session role in c2s:show diff -r c0eea4f6c739 -r e8f57970ced5 plugins/mod_admin_shell.lua --- a/plugins/mod_admin_shell.lua Mon Aug 15 15:25:07 2022 +0100 +++ b/plugins/mod_admin_shell.lua Mon Aug 15 16:36:00 2022 +0200 @@ -943,6 +943,15 @@ 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 @@ 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)