hostmanager: Warn when user puts port configuration under vhost section

Tue, 28 Jul 2009 17:43:46 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Tue, 28 Jul 2009 17:43:46 +0100
changeset 1614
951ed38ad64f
parent 1613
ebf0813a81f6
child 1615
0e3eacf135f2

hostmanager: Warn when user puts port configuration under vhost section

core/hostmanager.lua file | annotate | diff | comparison | revisions
--- a/core/hostmanager.lua	Tue Jul 28 15:03:42 2009 +0100
+++ b/core/hostmanager.lua	Tue Jul 28 17:43:46 2009 +0100
@@ -41,6 +41,11 @@
 	                 or (configmanager.get(host, "core", "anonymous_login") 
 	                     and (configmanager.get(host, "core", "disallow_s2s") ~= false))
 	              };
+	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
 	log((hosts_loaded_once and "info") or "debug", "Activated host: %s", host);
 	eventmanager.fire_event("host-activated", host, host_config);
 end

mercurial