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
commite774a4c4ba1f57888f40b5dc5cf93b19ad2b81d2 (patch)
treef981704cbe643a86fbe4648d43253f156c603133 /plugins/mod_admin_telnet.lua
parent0c6799c9368f41c38f2effceb29423e62b1693d2 (diff)
downloadprosody-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/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