- hosts[host] = {type = "local", connected = true, sessions = {}, host = host, s2sout = {} };
- log("info", "Activated host: %s", host);
+ hosts[host] = {type = "local", connected = true, sessions = {},
+ host = host, s2sout = {}, events = events_new(),
+ disallow_s2s = configmanager.get(host, "core", "disallow_s2s")
+ or (configmanager.get(host, "core", "anonymous_login")
+ and (configmanager.get(host, "core", "disallow_s2s") ~= false));
+ dialback_secret = configmanager.get(host, "core", "dialback_secret") or uuid_gen();
+ };
+ for option_name in pairs(host_config.core) do
+ if option_name:match("_ports$") then
+ log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in global Host \"*\" instead", host, option_name);
+ end
+ end
+
+ hosts[host].ssl_ctx = certmanager.get_context(host, "client", host_config); -- for outgoing connections
+ hosts[host].ssl_ctx_in = certmanager.get_context(host, "server", host_config); -- for incoming connections
+
+ log((hosts_loaded_once and "info") or "debug", "Activated host: %s", host);