changeset 2465:bd69ffe071e6

mod_firewall: Add 'TO SELF' check ('NOT TO?' worked until commit 9159f9166893)
author Matthew Wild <mwild1@gmail.com>
date Thu, 26 Jan 2017 18:36:15 +0000
parents 01babf1caa4a
children 349008f9452d
files mod_firewall/conditions.lib.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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