diff 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
parents 0f05804e974d
children 8128c4f1b08b
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua	Fri Apr 07 13:07:00 2023 +0200
+++ b/plugins/mod_admin_shell.lua	Fri Apr 07 13:09:00 2023 +0200
@@ -852,7 +852,7 @@
 	ip = {
 		title = "IP address";
 		description = "IP address the session connected from";
-		width = #"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff";
+		width = module:get_option_boolean("use_ipv6", true) and #"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff" or #"198.051.100.255";
 		key = "ip";
 	};
 	status = {