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 | 18497219e053d2bc28798b27d6adc23b039cf3ec (patch) | |
tree | f981704cbe643a86fbe4648d43253f156c603133 | |
parent | 1894252bd4d000923088e4db37de91c0270b323a (diff) | |
download | prosody-18497219e053d2bc28798b27d6adc23b039cf3ec.tar.gz prosody-18497219e053d2bc28798b27d6adc23b039cf3ec.zip |
mod_admin_telnet: get_host_set(): Include '*' in the set if no specific hosts are specified and the module is loaded there
-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 |