Enable dialback for components
authorWaqas Hussain <waqas20@gmail.com>
Tue, 9 Dec 2008 00:22:43 +0000 (05:22 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Tue, 9 Dec 2008 00:22:43 +0000 (05:22 +0500)
core/componentmanager.lua

index d7791c4bc072996bcd58675017220e0a24ab7e3a..974b5bf1dfcb801fa3476353b4bcb067a9e8a20e 100644 (file)
@@ -20,7 +20,8 @@
 
 \r
 \r
-local log = require "util.logger".init("componentmanager")\r
+local log = require "util.logger".init("componentmanager");
+local module_load = require "core.modulemanager".load;\r
 local jid_split = require "util.jid".split;\r
 local hosts = hosts;\r
 \r
@@ -45,7 +46,9 @@ function register_component(host, component)
        if not hosts[host] then\r
                -- TODO check for host well-formedness\r
                components[host] = component;\r
-               hosts[host] = {type = "component", host = host, connected = true, s2sout = {} };\r
+               hosts[host] = { type = "component", host = host, connected = true, s2sout = {} };
+               -- FIXME only load for a.b.c if b.c has dialback, and/or check in config
+               module_load(host, "dialback");\r
                log("debug", "component added: "..host);\r
                return hosts[host];\r
        else\r