Software /
code /
prosody
Changeset
4644:fb067c8a8d2e
mod_admin_telnet: get_host_set(): Include '*' in the set if no specific hosts are specified and the module is loaded there
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 21 Apr 2012 20:38:27 +0100 |
parents | 4643:9008fc396fb1 |
children | 4645:4539e99be743 |
files | plugins/mod_admin_telnet.lua |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_admin_telnet.lua Sat Apr 21 20:37:06 2012 +0100 +++ b/plugins/mod_admin_telnet.lua Sat Apr 21 20:38:27 2012 +0100 @@ -277,8 +277,12 @@ 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