Bumper commit for the new modulemanager API \o/ Updates all the modules, though some...
[prosody.git] / main.lua
index 053dff74a0a2a3451e536a24a63030f9c3117ab2..3ea97ca4df0cc0dbe98a69fb91e8c6578f940a57 100644 (file)
--- a/main.lua
+++ b/main.lua
@@ -63,10 +63,15 @@ require "util.jid"
 ------------------------------------------------------------------------
 
 -- Initialise modules
-local modules_enabled = config.get("*", "core", "modules_enabled");
-if modules_enabled then
-       for _, module in pairs(modules_enabled) do
-               modulemanager.load(module);
+
+for host in pairs(hosts) do
+       if host ~= "*" then
+               local modules_enabled = config.get(host, "core", "modules_enabled");
+               if modules_enabled then
+                       for _, module in pairs(modules_enabled) do
+                               modulemanager.load(host, module);
+                       end
+               end
        end
 end