From 23cd82ba5fd0a00d85fb7d6a708723419fdc0cb4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 22 Feb 2020 18:23:38 +0100 Subject: mod_admin_telnet: Reflow hosts filter for readability --- plugins/mod_admin_telnet.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 2485e698..730053fe 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -384,7 +384,12 @@ end -- 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 -- cgit v1.2.3