aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-02-22 18:23:38 +0100
committerKim Alvefur <zash@zash.se>2020-02-22 18:23:38 +0100
commit23cd82ba5fd0a00d85fb7d6a708723419fdc0cb4 (patch)
tree8cf486176c68eca940b9cc4aff9f6e49e7f44fba
parent132191f6ffbddd5d35fdea2508ce0015bcc1a16b (diff)
downloadprosody-23cd82ba5fd0a00d85fb7d6a708723419fdc0cb4.tar.gz
prosody-23cd82ba5fd0a00d85fb7d6a708723419fdc0cb4.zip
mod_admin_telnet: Reflow hosts filter for readability
-rw-r--r--plugins/mod_admin_telnet.lua7
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