Merge configmanager->trunk

Wed, 05 May 2010 19:01:14 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 05 May 2010 19:01:14 +0100
changeset 3012
6d86e26f0923
parent 3010
52146b82f295 (current diff)
parent 3011
1189a29cd846 (diff)
child 3013
518e3f6f9946

Merge configmanager->trunk

core/configmanager.lua file | annotate | diff | comparison | revisions
--- a/core/configmanager.lua	Wed May 05 17:22:43 2010 +0100
+++ b/core/configmanager.lua	Wed May 05 19:01:14 2010 +0100
@@ -114,7 +114,8 @@
 		local env;
 		-- The ' = true' are needed so as not to set off __newindex when we assign the functions below
 		env = setmetatable({
-			Host = true; host = true; Component = true, component = true,
+			Host = true, host = true, VirtualHost = true,
+			Component = true, component = true,
 			Include = true, include = true, RunScript = dofile }, {
 				__index = function (t, k)
 					return rawget(_G, k) or
@@ -128,7 +129,7 @@
 		});
 		
 		rawset(env, "__currenthost", "*") -- Default is global
-		function env.Host(name)
+		function env.VirtualHost(name)
 			if rawget(config, name) and rawget(config[name].core, "component_module") then
 				error(format("Host %q clashes with previously defined %s Component %q, for services use a sub-domain like conference.%s",
 					name, config[name].core.component_module:gsub("^%a+$", { component = "external", muc = "MUC"}), name, name), 0);
@@ -137,7 +138,7 @@
 			-- Needs at least one setting to logically exist :)
 			set(name or "*", "core", "defined", true);
 		end
-		env.host = env.Host;
+		env.Host, env.host = env.VirtualHost, env.VirtualHost;
 		
 		function env.Component(name)
 			if rawget(config, name) and rawget(config[name].core, "defined") and not rawget(config[name].core, "component_module") then

mercurial