projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d085b3c
)
Let global modules add disco features for all hosts
author
Waqas Hussain
<waqas20@gmail.com>
Wed, 4 Mar 2009 17:23:41 +0000
(22:23 +0500)
committer
Waqas Hussain
<waqas20@gmail.com>
Wed, 4 Mar 2009 17:23:41 +0000
(22:23 +0500)
core/modulemanager.lua
patch
|
blob
|
history
diff --git
a/core/modulemanager.lua
b/core/modulemanager.lua
index 5bbff0add35355f0e9aeb4da0e2023e262414ea1..76ea0bc07df5460e7cca9e2ebbbfb58b197748e7 100644
(file)
--- 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);