diff options
author | Kim Alvefur <zash@zash.se> | 2020-02-22 18:23:38 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-02-22 18:23:38 +0100 |
commit | 62e66fe940cd820119b90ad40fba347894ff7d52 (patch) | |
tree | 8cf486176c68eca940b9cc4aff9f6e49e7f44fba /plugins | |
parent | 06e45373211c207473e20c94c8e0b720af6e5c8e (diff) | |
download | prosody-62e66fe940cd820119b90ad40fba347894ff7d52.tar.gz prosody-62e66fe940cd820119b90ad40fba347894ff7d52.zip |
mod_admin_telnet: Reflow hosts filter for readability
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_admin_telnet.lua | 7 |
1 files changed, 6 insertions, 1 deletions
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 |