From 26b4dd8860483a4ce5a1b6fc8730c5baa9c437fe Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 23 Sep 2016 14:03:37 +0200 Subject: mod_carbons: Make the conditions for ignoring MUC PMs more specific (fixes #744) --- plugins/mod_carbons.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_carbons.lua b/plugins/mod_carbons.lua index 9ef14713..71ad786d 100644 --- a/plugins/mod_carbons.lua +++ b/plugins/mod_carbons.lua @@ -1,5 +1,5 @@ -- XEP-0280: Message Carbons implementation for Prosody --- Copyright (C) 2011 Kim Alvefur +-- Copyright (C) 2011-2016 Kim Alvefur -- -- This file is MIT/X11 licensed. @@ -67,7 +67,7 @@ local function message_handler(event, c2s) elseif stanza:get_child("no-copy", "urn:xmpp:hints") then module:log("debug", "Message has no-copy hint, ignoring"); return - elseif stanza:get_child("x", "http://jabber.org/protocol/muc#user") then + elseif not c2s and orig_from ~= orig_from and stanza:get_child("x", "http://jabber.org/protocol/muc#user") then module:log("debug", "MUC PM, ignoring"); return end -- cgit v1.2.3 From 6fce2771a668c8171f331c687969fba2943c8b09 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 23 Sep 2016 14:06:25 +0200 Subject: mod_carbons: Compare with correct variable --- plugins/mod_carbons.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_carbons.lua b/plugins/mod_carbons.lua index 71ad786d..2429eefc 100644 --- a/plugins/mod_carbons.lua +++ b/plugins/mod_carbons.lua @@ -67,7 +67,7 @@ local function message_handler(event, c2s) elseif stanza:get_child("no-copy", "urn:xmpp:hints") then module:log("debug", "Message has no-copy hint, ignoring"); return - elseif not c2s and orig_from ~= orig_from and stanza:get_child("x", "http://jabber.org/protocol/muc#user") then + elseif not c2s and bare_jid ~= orig_from and stanza:get_child("x", "http://jabber.org/protocol/muc#user") then module:log("debug", "MUC PM, ignoring"); return end -- cgit v1.2.3 From 762c972330f7d298f31ccd547a0cb05ce111323c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 23 Sep 2016 16:26:09 +0200 Subject: mod_carbons: Fix inverted logic (Thanks Ge0rg)} --- plugins/mod_carbons.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_carbons.lua b/plugins/mod_carbons.lua index 2429eefc..951645f8 100644 --- a/plugins/mod_carbons.lua +++ b/plugins/mod_carbons.lua @@ -67,7 +67,7 @@ local function message_handler(event, c2s) elseif stanza:get_child("no-copy", "urn:xmpp:hints") then module:log("debug", "Message has no-copy hint, ignoring"); return - elseif not c2s and bare_jid ~= orig_from and stanza:get_child("x", "http://jabber.org/protocol/muc#user") then + elseif not c2s and bare_jid == orig_from and stanza:get_child("x", "http://jabber.org/protocol/muc#user") then module:log("debug", "MUC PM, ignoring"); return end -- cgit v1.2.3 From 56cff1b44896ecab1571949b59ceec189acd289b Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 27 Sep 2016 22:01:46 +0100 Subject: mod_s2s: Lower log message to 'warn' level, standard for remotely-triggered protocol issues --- plugins/mod_s2s/mod_s2s.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index 4173fcfa..e038e5b4 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -365,7 +365,7 @@ function stream_callbacks.streamopened(session, attr) elseif session.direction == "outgoing" then session.notopen = nil; if not attr.id then - log("error", "Stream response did not give us a stream id!"); + log("warn", "Stream response did not give us a stream id!"); session:close({ condition = "undefined-condition", text = "Missing stream ID" }); return; end -- cgit v1.2.3 From 2b4d4d841cf3b4d454c84e534a1cb666c1f3ad65 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 1 Oct 2016 21:51:07 +0200 Subject: MUC: Return 'true' from room:destroy() so that use from the telnet console says 'OK' --- plugins/muc/muc.lib.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 4018489a..cc147d19 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -756,6 +756,7 @@ function room_mt:destroy(newjid, reason, password) end self:set_persistent(false); module:fire_event("muc-room-destroyed", { room = self }); + return true; end function room_mt:handle_to_room(origin, stanza) -- presence changes and groupchat messages, along with disco/etc -- cgit v1.2.3 From 92730073ce30a57c8a2dd673f239a7430845b2d4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 4 Oct 2016 15:46:24 +0200 Subject: mod_s2s: Log error message from DNS lookup --- plugins/mod_s2s/s2sout.lib.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins') diff --git a/plugins/mod_s2s/s2sout.lib.lua b/plugins/mod_s2s/s2sout.lib.lua index 1038a616..61d6086e 100644 --- a/plugins/mod_s2s/s2sout.lib.lua +++ b/plugins/mod_s2s/s2sout.lib.lua @@ -176,6 +176,8 @@ function s2sout.try_connect(host_session, connect_host, connect_port, err) log("debug", "DNS reply for %s gives us %s", connect_host, ip.a); IPs[#IPs+1] = new_ip(ip.a, "IPv4"); end + elseif err then + log("debug", "Error in DNS lookup: %s", err); end if have_other_result then @@ -212,6 +214,8 @@ function s2sout.try_connect(host_session, connect_host, connect_port, err) log("debug", "DNS reply for %s gives us %s", connect_host, ip.aaaa); IPs[#IPs+1] = new_ip(ip.aaaa, "IPv6"); end + elseif err then + log("debug", "Error in DNS lookup: %s", err); end if have_other_result then -- cgit v1.2.3