diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-05-04 23:36:50 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-05-04 23:36:50 +0100 |
commit | bb00df3f5e95d57c7dff489c5a3da1b292251f85 (patch) | |
tree | f77f1673a20e30d53488924ed31f2e8d286a78f1 /core | |
parent | f050b618466ad7d6008fc96d3860c0ad868af7e8 (diff) | |
parent | 3376282d8aacc5814519e16c8b04809f24b9f248 (diff) | |
download | prosody-bb00df3f5e95d57c7dff489c5a3da1b292251f85.tar.gz prosody-bb00df3f5e95d57c7dff489c5a3da1b292251f85.zip |
Merge 0.7->trunk (with MUC needing checking, waqas)
Diffstat (limited to 'core')
-rw-r--r-- | core/hostmanager.lua | 6 | ||||
-rw-r--r-- | core/modulemanager.lua | 10 |
2 files changed, 12 insertions, 4 deletions
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 diff --git a/core/modulemanager.lua b/core/modulemanager.lua index 5e9eaedd..8e62aecb 100644 --- a/core/modulemanager.lua +++ b/core/modulemanager.lua @@ -19,7 +19,7 @@ local pluginloader = require "util.pluginloader"; local hosts = hosts; local prosody = prosody; -local loadfile, pcall = loadfile, pcall; +local loadfile, pcall, xpcall = loadfile, pcall, xpcall; local setmetatable, setfenv, getfenv = setmetatable, setfenv, getfenv; local pairs, ipairs = pairs, ipairs; local t_insert, t_concat = table.insert, table.concat; @@ -29,6 +29,14 @@ local rawget = rawget; local error = error; local tostring, tonumber = tostring, tonumber; +local debug_traceback = debug.traceback; +local unpack, select = unpack, select; +pcall = function(f, ...) + local n = select("#", ...); + local params = {...}; + return xpcall(function() f(unpack(params, 1, n)) end, function(e) return tostring(e).."\n"..debug_traceback(); end); +end + local array, set = require "util.array", require "util.set"; local autoload_modules = {"presence", "message", "iq"}; |