# HG changeset patch # User Georg Lukas # Date 1609949236 -3600 # Node ID 71498f484c22e959834c564fe41467c19a3459c4 # Parent 8fc16174fec606ee9c21d326e51dc572a4d113c4 mod_muc_ban_ip: do not error() on banned user sending error to MUC diff -r 8fc16174fec6 -r 71498f484c22 mod_muc_ban_ip/mod_muc_ban_ip.lua --- a/mod_muc_ban_ip/mod_muc_ban_ip.lua Fri May 22 09:47:42 2020 +0200 +++ b/mod_muc_ban_ip/mod_muc_ban_ip.lua Wed Jan 06 17:07:16 2021 +0100 @@ -48,9 +48,11 @@ local to = jid_bare(stanza.attr.to); if ip_bans[ip] and ip_bans[ip][to] then (origin.log or module._log)("debug", "IP banned: %s is banned from %s", ip, to) - origin.send(st.error_reply(stanza, "auth", "forbidden") - :tag("x", { xmlns = xmlns_muc_user }) - :tag("status", { code = '301' })); + if stanza.attr.type != "error" then + origin.send(st.error_reply(stanza, "auth", "forbidden") + :tag("x", { xmlns = xmlns_muc_user }) + :tag("status", { code = '301' })); + end return true; end (origin.log or module._log)("debug", "IP not banned: %s from %s", ip, to)