From: Matthew Wild Date: Thu, 25 Feb 2010 18:03:15 +0000 (+0000) Subject: Merge with 0.6 X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=095d291f5356ff2450c11608fda6bdabc4286f91;p=prosody.git Merge with 0.6 --- 095d291f5356ff2450c11608fda6bdabc4286f91 diff --cc core/s2smanager.lua index 875a6bdc,bfa3069a..16ede7b6 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@@ -48,9 -50,11 +48,11 @@@ local incoming_s2s = incoming_s2s module "s2smanager" - local function compare_srv_priorities(a,b) return a.priority < b.priority or a.weight < b.weight; end + function compare_srv_priorities(a,b) + return a.priority < b.priority or (a.priority == b.priority and a.weight > b.weight); + end -local function bounce_sendq(session) +local function bounce_sendq(session, reason) local sendq = session.sendq; if sendq then session.log("info", "sending error replies for "..#sendq.." queued stanzas because of failed outgoing connection to "..tostring(session.to_host)); diff --cc plugins/mod_offline.lua index c74d011e,c74d011e..00000000 deleted file mode 100644,100644 --- a/plugins/mod_offline.lua +++ /dev/null @@@ -1,56 -1,56 +1,0 @@@ ---- Prosody IM ---- Copyright (C) 2008-2009 Matthew Wild ---- Copyright (C) 2008-2009 Waqas Hussain ---- ---- This project is MIT/X11 licensed. Please see the ---- COPYING file in the source package for more information. ---- -- -- --local datamanager = require "util.datamanager"; --local st = require "util.stanza"; --local datetime = require "util.datetime"; --local ipairs = ipairs; --local jid_split = require "util.jid".split; -- --module:add_feature("msgoffline"); -- --module:hook("message/offline/store", function(event) -- local origin, stanza = event.origin, event.stanza; -- local to = stanza.attr.to; -- local node, host; -- if to then -- node, host = jid_split(to) -- else -- node, host = origin.username, origin.host; -- end -- -- stanza.attr.stamp, stanza.attr.stamp_legacy = datetime.datetime(), datetime.legacy(); -- local result = datamanager.list_append(node, host, "offline", st.preserialize(stanza)); -- stanza.attr.stamp, stanza.attr.stamp_legacy = nil, nil; -- -- return true; --end); -- --module:hook("message/offline/broadcast", function(event) -- local origin = event.origin; -- local node, host = origin.username, origin.host; -- -- local data = datamanager.list_load(node, host, "offline"); -- if not data then return true; end -- for _, stanza in ipairs(data) do -- stanza = st.deserialize(stanza); -- stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = host, stamp = stanza.attr.stamp}):up(); -- XEP-0203 -- stanza:tag("x", {xmlns = "jabber:x:delay", from = host, stamp = stanza.attr.stamp_legacy}):up(); -- XEP-0091 (deprecated) -- stanza.attr.stamp, stanza.attr.stamp_legacy = nil, nil; -- origin.send(stanza); -- end -- return true; --end); -- --module:hook("message/offline/delete", function(event) -- local origin = event.origin; -- local node, host = origin.username, origin.host; -- -- return datamanager.list_store(node, host, "offline", nil); --end); diff --cc prosody index 47b042d3,7f69e085..49580bd9 --- a/prosody +++ b/prosody @@@ -22,7 -21,9 +22,10 @@@ if CFG_SOURCEDIR the package.cpath = CFG_SOURCEDIR.."/?.so;"..package.cpath; end + package.path = package.path..";"..(CFG_SOURCEDIR or ".").."/fallbacks/?.lua"; + package.cpath = package.cpath..";"..(CFG_SOURCEDIR or ".").."/fallbacks/?.so"; + +-- Substitute ~ with path to home directory in data path if CFG_DATADIR then if os.getenv("HOME") then CFG_DATADIR = CFG_DATADIR:gsub("^~", os.getenv("HOME"));