diff mod_firewall/conditions.lib.lua @ 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 f96bdfd81eba
children d4bc434a60a4
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