aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-21 20:39:52 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-21 20:39:52 +0100
commit785fcb0ee39111f31aaa0ebd0d00a797108b6c68 (patch)
treed2924fabab3dffec8b777ba9f4e5ef54c84572c7 /plugins
parent726f3804c3ed5b4d0d3e94b3f4c860c30d76a500 (diff)
downloadprosody-785fcb0ee39111f31aaa0ebd0d00a797108b6c68.tar.gz
prosody-785fcb0ee39111f31aaa0ebd0d00a797108b6c68.zip
mod_admin_telnet: module:list(): List global modules (part-fixes #228)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_admin_telnet.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua
index 2f2e057b..412e1e62 100644
--- a/plugins/mod_admin_telnet.lua
+++ b/plugins/mod_admin_telnet.lua
@@ -363,6 +363,7 @@ end
function def_env.module:list(hosts)
if hosts == nil then
hosts = array.collect(keys(prosody.hosts));
+ table.insert(hosts, 1, "*");
end
if type(hosts) == "string" then
hosts = { hosts };
@@ -373,8 +374,8 @@ function def_env.module:list(hosts)
local print = self.session.print;
for _, host in ipairs(hosts) do
- print(host..":");
- local modules = array.collect(keys(prosody.hosts[host] and prosody.hosts[host].modules or {})):sort();
+ print((host == "*" and "Global" or host)..":");
+ local modules = array.collect(keys(modulemanager.get_modules(host) or {})):sort();
if #modules == 0 then
if prosody.hosts[host] then
print(" No modules loaded");