# HG changeset patch # User Kim Alvefur # Date 1445612101 -7200 # Node ID 252b634b065d410a96b4c9ad18df2e27194b274f # Parent 439711709d29cdec42ba1589e0d12a5a07346e54 mod_block_strangers: Bounce IQ stanzas (they MUST be replied to) diff -r 439711709d29 -r 252b634b065d mod_block_strangers/mod_block_strangers.lua --- a/mod_block_strangers/mod_block_strangers.lua Fri Oct 23 16:52:45 2015 +0200 +++ b/mod_block_strangers/mod_block_strangers.lua Fri Oct 23 16:55:01 2015 +0200 @@ -11,6 +11,9 @@ if to_resource and stanza.attr.type == "groupchat" then return nil; -- Pass through end + if stanza.name == "iq" and ( stanza.attr.type == "get" or stanza.attr.type == "set" ) then + event.origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); + end return true; -- Drop stanza end end