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 | 23cd82ba5fd0a00d85fb7d6a708723419fdc0cb4 (patch) | |
tree | 8cf486176c68eca940b9cc4aff9f6e49e7f44fba /plugins/mod_admin_telnet.lua | |
parent | 132191f6ffbddd5d35fdea2508ce0015bcc1a16b (diff) | |
download | prosody-23cd82ba5fd0a00d85fb7d6a708723419fdc0cb4.tar.gz prosody-23cd82ba5fd0a00d85fb7d6a708723419fdc0cb4.zip |
mod_admin_telnet: Reflow hosts filter for readability
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-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 |