diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-03-04 22:23:41 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-03-04 22:23:41 +0500 |
commit | 63898e571456712a4d90d5429aaa355bcc83d169 (patch) | |
tree | d4d80a7bf8d95ce958ff56e48bc96aa8b82249f0 /core | |
parent | b32270030991773c6cafd526f676bd88da5e70f7 (diff) | |
download | prosody-63898e571456712a4d90d5429aaa355bcc83d169.tar.gz prosody-63898e571456712a4d90d5429aaa355bcc83d169.zip |
Let global modules add disco features for all hosts
Diffstat (limited to 'core')
-rw-r--r-- | core/modulemanager.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 5bbff0ad..76ea0bc0 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -300,6 +300,14 @@ addDiscoInfoHandler("*host", function(reply, to, from, node) end end end + for module, features in pairs(features_table:get("*") or NULL) do -- for each module + for feature in pairs(features) do + if not done[feature] then + reply:tag("feature", {var = feature}):up(); -- TODO cache + done[feature] = true; + end + end + end return next(done) ~= nil; end end); |