aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_telnet.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-21 20:38:27 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-21 20:38:27 +0100
commit18497219e053d2bc28798b27d6adc23b039cf3ec (patch)
treef981704cbe643a86fbe4648d43253f156c603133 /plugins/mod_admin_telnet.lua
parent1894252bd4d000923088e4db37de91c0270b323a (diff)
downloadprosody-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
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-rw-r--r--plugins/mod_admin_telnet.lua6
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