Changeset

10657:197ba9539390

mod_admin_telnet: Reflow hosts filter for readability
author Kim Alvefur <zash@zash.se>
date Sat, 22 Feb 2020 18:23:38 +0100
parents 10656:ffa9a20aca8b
children 10658:52c6dfa04dba
files plugins/mod_admin_telnet.lua
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua	Sat Feb 22 16:26:20 2020 +0100
+++ b/plugins/mod_admin_telnet.lua	Sat Feb 22 18:23:38 2020 +0100
@@ -384,7 +384,12 @@
 -- matching modules_enabled in the global section
 local function get_hosts_with_module(hosts, module)
 	local hosts_set = get_hosts_set(hosts)
-	/ function (host) return (prosody.hosts[host].type == "local" or module and modulemanager.is_loaded(host, module)) and host or nil; end;
+	/ function (host)
+			if prosody.hosts[host].type == "local" or module and modulemanager.is_loaded(host, module) then
+				return host;
+			end;
+			return nil;
+		end;
 	if module and modulemanager.get_module("*", module) then
 		hosts_set:add("*");
 	end