aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
commit62e66fe940cd820119b90ad40fba347894ff7d52 (patch)
tree8cf486176c68eca940b9cc4aff9f6e49e7f44fba /plugins
parent06e45373211c207473e20c94c8e0b720af6e5c8e (diff)
downloadprosody-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.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