# HG changeset patch # User Kim Alvefur # Date 1680468269 -7200 # Node ID 1387888a5596bc6f1d446034691ed255b1a65fb6 # Parent a863e4237b9191b7b978b9a808f52b1d1f463ef1 mod_admin_shell: Strip 'prosody:' prefix to allow narrower Role column diff -r a863e4237b91 -r 1387888a5596 plugins/mod_admin_shell.lua --- a/plugins/mod_admin_shell.lua Thu Apr 06 16:30:26 2023 +0200 +++ b/plugins/mod_admin_shell.lua Sun Apr 02 22:44:29 2023 +0200 @@ -966,11 +966,12 @@ }; role = { title = "Role"; - description = "Session role"; - width = 20; + description = "Session role with 'prosody:' prefix removed"; + width = #"admin"; key = "role"; mapper = function(role) - return role and role.name; + local name = role and role.name; + return name and name:match"^prosody:(%w+)" or name; end; } };