Software /
code /
prosody
Comparison
core/hostmanager.lua @ 3715:d7574530572c
hostmanager: activate() now gets the host config from configmanager when a config isn't given.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 09 Dec 2010 21:11:12 +0500 |
parent | 3601:829e23b374cc |
child | 3716:ebb2c6209e24 |
comparison
equal
deleted
inserted
replaced
3714:f18515d2d10b | 3715:d7574530572c |
---|---|
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(); |