aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/modulemanager.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 5afe3144..76ea0bc0 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -212,6 +212,7 @@ function handle_stanza(host, origin, stanza)
end
end
local handlers = stanza_handlers:get(host, origin_type, name, xmlns);
+ if not handlers then handlers = stanza_handlers:get("*", origin_type, name, xmlns); end
if handlers then
log("debug", "Passing stanza to mod_%s", handler_info[handlers[1]].name);
(handlers[1])(origin, stanza);
@@ -299,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);