43 |
44 |
44 function register_component(host, component) |
45 function register_component(host, component) |
45 if not hosts[host] then |
46 if not hosts[host] then |
46 -- TODO check for host well-formedness |
47 -- TODO check for host well-formedness |
47 components[host] = component; |
48 components[host] = component; |
48 hosts[host] = {type = "component", host = host, connected = true, s2sout = {} }; |
49 hosts[host] = { type = "component", host = host, connected = true, s2sout = {} }; |
|
50 -- FIXME only load for a.b.c if b.c has dialback, and/or check in config |
|
51 module_load(host, "dialback"); |
49 log("debug", "component added: "..host); |
52 log("debug", "component added: "..host); |
50 return hosts[host]; |
53 return hosts[host]; |
51 else |
54 else |
52 log("error", "Attempt to set component for existing host: "..host); |
55 log("error", "Attempt to set component for existing host: "..host); |
53 end |
56 end |