52 |
52 |
53 prosody_events.add_handler("server-starting", load_enabled_hosts); |
53 prosody_events.add_handler("server-starting", load_enabled_hosts); |
54 |
54 |
55 function activate(host, host_config) |
55 function activate(host, host_config) |
56 if hosts[host] then return nil, "host-already-exists"; end |
56 if hosts[host] then return nil, "host-already-exists"; end |
|
57 host_config = host_config or configmanager.getconfig()[host]; |
57 local host_session = { |
58 local host_session = { |
58 host = host; |
59 host = host; |
59 s2sout = {}; |
60 s2sout = {}; |
60 events = events_new(); |
61 events = events_new(); |
61 dialback_secret = configmanager.get(host, "core", "dialback_secret") or uuid_gen(); |
62 dialback_secret = configmanager.get(host, "core", "dialback_secret") or uuid_gen(); |