Software / code / prosody
Comparison
plugins/mod_admin_shell.lua @ 13043:d4f7118d1531
mod_admin_shell: Make IP column thinner if IPv6 is disabled
IPv6 addresses can be pretty long, so if they can be more compact,
that's nice.
But nobody would disable IPv6, would they?
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 07 Apr 2023 13:09:00 +0200 |
| parent | 13042:0f05804e974d |
| child | 13053:8128c4f1b08b |
comparison
equal
deleted
inserted
replaced
| 13042:0f05804e974d | 13043:d4f7118d1531 |
|---|---|
| 850 mapper = function(ip) if ip then return ip:find(":") and "IPv6" or "IPv4"; end end; | 850 mapper = function(ip) if ip then return ip:find(":") and "IPv6" or "IPv4"; end end; |
| 851 }; | 851 }; |
| 852 ip = { | 852 ip = { |
| 853 title = "IP address"; | 853 title = "IP address"; |
| 854 description = "IP address the session connected from"; | 854 description = "IP address the session connected from"; |
| 855 width = #"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"; | 855 width = module:get_option_boolean("use_ipv6", true) and #"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff" or #"198.051.100.255"; |
| 856 key = "ip"; | 856 key = "ip"; |
| 857 }; | 857 }; |
| 858 status = { | 858 status = { |
| 859 title = "Status"; | 859 title = "Status"; |
| 860 description = "Presence status"; | 860 description = "Presence status"; |