diff -r 39774b078dde -r 7ba6ed553c93 mod_firewall/conditions.lib.lua --- a/mod_firewall/conditions.lib.lua Sun Jan 31 12:38:51 2016 +0100 +++ b/mod_firewall/conditions.lib.lua Mon Feb 01 20:24:51 2016 +0000 @@ -58,6 +58,14 @@ return compile_jid_match("from", from), { "split_from" }; end +function condition_handlers.FROM_EXACTLY(from) + return ("from == %q"):format(from), { "from" }; +end + +function condition_handlers.TO_EXACTLY(to) + return ("to == %q"):format(to), { "to" }; +end + function condition_handlers.TYPE(type) return compile_comparison_list("(type or (name == 'message' and 'normal') or (name == 'presence' and 'available'))", type), { "type", "name" }; end