diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-04-21 20:38:27 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-04-21 20:38:27 +0100 |
commit | e774a4c4ba1f57888f40b5dc5cf93b19ad2b81d2 (patch) | |
tree | f981704cbe643a86fbe4648d43253f156c603133 /plugins | |
parent | 0c6799c9368f41c38f2effceb29423e62b1693d2 (diff) | |
download | prosody-e774a4c4ba1f57888f40b5dc5cf93b19ad2b81d2.tar.gz prosody-e774a4c4ba1f57888f40b5dc5cf93b19ad2b81d2.zip |
mod_admin_telnet: get_host_set(): Include '*' in the set if no specific hosts are specified and the module is loaded there
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_admin_telnet.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 3799efc0..e60a2245 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -277,8 +277,12 @@ local function get_hosts_set(hosts, module) return set.new { hosts }; elseif hosts == nil then local mm = require "modulemanager"; - return set.new(array.collect(keys(prosody.hosts))) + local hosts_set = set.new(array.collect(keys(prosody.hosts))) / function (host) return prosody.hosts[host].type == "local" or module and mm.is_loaded(host, module); end; + if module and mm.get_module("*", module) then + hosts_set:add("*"); + end + return hosts_set; end end |