# HG changeset patch # User Kim Alvefur # Date 1680865082 -7200 # Node ID 635ed9a362ee5273a81832060406ffdbac738875 # Parent 1612c7f7dd55b6ea0115b28d8085f1386eb4b797 mod_admin_shell: Dynamically size JIDs and hosts Reasoning: a hostname is one part, a JID is 3 parts. diff -r 1612c7f7dd55 -r 635ed9a362ee plugins/mod_admin_shell.lua --- a/plugins/mod_admin_shell.lua Fri Apr 07 12:48:17 2023 +0200 +++ b/plugins/mod_admin_shell.lua Fri Apr 07 12:58:02 2023 +0200 @@ -771,7 +771,7 @@ jid = { title = "JID"; description = "Full JID of user session"; - width = 32; + width = "3p"; key = "full_jid"; mapper = function(full_jid, session) return full_jid or get_jid(session) end; }; @@ -779,7 +779,7 @@ title = "Host"; description = "Local hostname"; key = "host"; - width = 22; + width = "1p"; mapper = function(host, session) return host or get_s2s_hosts(session) or "?"; end; @@ -787,7 +787,7 @@ remote = { title = "Remote"; description = "Remote hostname"; - width = 22; + width = "1p"; mapper = function(_, session) return select(2, get_s2s_hosts(session)); end; @@ -912,7 +912,7 @@ sni = { title = "SNI"; description = "Hostname requested in TLS"; - width = 22; -- same as host, remote etc + width = "1p"; -- same as host, remote etc mapper = function(_, session) if not session.conn then return end local sock = session.conn:socket();