aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-05-05 19:01:14 +0100
committerMatthew Wild <mwild1@gmail.com>2010-05-05 19:01:14 +0100
commitc60b80b85145981fa6bbf666c2fbd9c0578e7142 (patch)
treebcd9bfbcd3170bb426011c02470ae98b43a32d7a /core
parent28942eed12a9d77431cf4b78814deb63356c751a (diff)
parente5267262af2f06097bdf246c4f44d5e88b2d15a8 (diff)
downloadprosody-c60b80b85145981fa6bbf666c2fbd9c0578e7142.tar.gz
prosody-c60b80b85145981fa6bbf666c2fbd9c0578e7142.zip
Merge configmanager->trunk
Diffstat (limited to 'core')
-rw-r--r--core/configmanager.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua
index 1b1a6dc5..9b03e1c7 100644
--- a/core/configmanager.lua
+++ b/core/configmanager.lua
@@ -114,7 +114,8 @@ do
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 @@ do
});
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 @@ do
-- 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