diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-05-01 05:18:38 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-05-01 05:18:38 +0500 |
commit | 3376282d8aacc5814519e16c8b04809f24b9f248 (patch) | |
tree | 7e5980dff5518468ef2d7f18b66f4826b5ab62e9 /core | |
parent | 2d68866021180ac35c77b6022e717bc727280177 (diff) | |
parent | 170a2e9b64199f9a72976f5e24556d30c851192e (diff) | |
download | prosody-3376282d8aacc5814519e16c8b04809f24b9f248.tar.gz prosody-3376282d8aacc5814519e16c8b04809f24b9f248.zip |
Merge 0.6 into 0.7.
Diffstat (limited to 'core')
-rw-r--r-- | core/configmanager.lua | 6 | ||||
-rw-r--r-- | core/hostmanager.lua | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua index e7677df6..54fb0a9a 100644 --- a/core/configmanager.lua +++ b/core/configmanager.lua @@ -112,7 +112,7 @@ do function parsers.lua.load(data, filename) 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, + env = setmetatable({ 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 function (settings_table) @@ -124,7 +124,7 @@ do end}); 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); @@ -133,7 +133,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 diff --git a/core/hostmanager.lua b/core/hostmanager.lua index eb880449..c8928b27 100644 --- a/core/hostmanager.lua +++ b/core/hostmanager.lua @@ -42,7 +42,7 @@ local function load_enabled_hosts(config) end if not activated_any_host then - log("error", "No hosts defined in the config file. This may cause unexpected behaviour as no modules will be loaded."); + log("error", "No active VirtualHost entries in the config file. This may cause unexpected behaviour as no modules will be loaded."); end eventmanager.fire_event("hosts-activated", defined_hosts); @@ -60,8 +60,8 @@ function activate(host, host_config) 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); + if option_name:match("_ports$") or option_name:match("_interface$") then + log("warn", "%s: Option '%s' has no effect for virtual hosts - put it in the server-wide section instead", host, option_name); end end |