# HG changeset patch # User Matthew Wild # Date 1485455775 0 # Node ID bd69ffe071e64d0a12d4f6daa26e3a12dcb74d2c # Parent 01babf1caa4a7f9385080ba6f17cdeeb1c0f58ac mod_firewall: Add 'TO SELF' check ('NOT TO?' worked until commit 9159f9166893) diff -r 01babf1caa4a -r bd69ffe071e6 mod_firewall/conditions.lib.lua --- a/mod_firewall/conditions.lib.lua Thu Jan 26 18:04:59 2017 +0000 +++ b/mod_firewall/conditions.lib.lua Thu Jan 26 18:36:15 2017 +0000 @@ -73,6 +73,10 @@ return ("to == %q"):format(to), { "to" }; end +function condition_handlers.TO_SELF() + return ("to == nil"); +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