# HG changeset patch # User Kim Alvefur # Date 1582392218 -3600 # Node ID 197ba9539390a78e1971a03d7b0472f87b3c982f # Parent ffa9a20aca8b598f519b68277816c648ce271d2f mod_admin_telnet: Reflow hosts filter for readability diff -r ffa9a20aca8b -r 197ba9539390 plugins/mod_admin_telnet.lua --- 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