core/hostmanager.lua
changeset 2981 15a7afea7f59
parent 2923 b7049746bd29
child 2984 3094166cfdd5
equal deleted inserted replaced
2980:9f593650b3ce 2981:15a7afea7f59
    41 			activate(host, host_config);
    41 			activate(host, host_config);
    42 		end
    42 		end
    43 	end
    43 	end
    44 	
    44 	
    45 	if not activated_any_host then
    45 	if not activated_any_host then
    46 		log("error", "No hosts defined in the config file. This may cause unexpected behaviour as no modules will be loaded.");
    46 		log("error", "No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded.");
    47 	end
    47 	end
    48 	
    48 	
    49 	eventmanager.fire_event("hosts-activated", defined_hosts);
    49 	eventmanager.fire_event("hosts-activated", defined_hosts);
    50 	hosts_loaded_once = true;
    50 	hosts_loaded_once = true;
    51 end
    51 end
    58 	               disallow_s2s = configmanager.get(host, "core", "disallow_s2s") 
    58 	               disallow_s2s = configmanager.get(host, "core", "disallow_s2s") 
    59 	                 or (configmanager.get(host, "core", "anonymous_login") 
    59 	                 or (configmanager.get(host, "core", "anonymous_login") 
    60 	                     and (configmanager.get(host, "core", "disallow_s2s") ~= false))
    60 	                     and (configmanager.get(host, "core", "disallow_s2s") ~= false))
    61 	              };
    61 	              };
    62 	for option_name in pairs(host_config.core) do
    62 	for option_name in pairs(host_config.core) do
    63 		if option_name:match("_ports$") then
    63 		if option_name:match("_ports$") or option_name:match("_interface$") then
    64 			log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in global Host \"*\" instead", host, option_name);
    64 			log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in the server-wide section instead", host, option_name);
    65 		end
    65 		end
    66 	end
    66 	end
    67 	
    67 	
    68 	if ssl then
    68 	if ssl then
    69 		local ssl_config = host_config.core.ssl or configmanager.get("*", "core", "ssl");
    69 		local ssl_config = host_config.core.ssl or configmanager.get("*", "core", "ssl");