Software /
code /
prosody
Diff
plugins/mod_admin_telnet.lua @ 10657:197ba9539390
mod_admin_telnet: Reflow hosts filter for readability
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 22 Feb 2020 18:23:38 +0100 |
parent | 10644:6c4ab1b87588 |
child | 10658:52c6dfa04dba |
line wrap: on
line diff
--- 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