changeset 964:04e85eb3dfef

mod_firewall/conditions: Default types for message and presence
author Matthew Wild <mwild1@gmail.com>
date Fri, 05 Apr 2013 19:20:05 +0100
parents c7fca2c9e24f
children d4e24fb289c0
files mod_firewall/conditions.lib.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua	Fri Apr 05 19:18:41 2013 +0100
+++ b/mod_firewall/conditions.lib.lua	Fri Apr 05 19:20:05 2013 +0100
@@ -59,7 +59,8 @@
 end
 
 function condition_handlers.TYPE(type)
-	return compile_comparison_list("type", type), { "type" };
+	return compile_comparison_list("(type or (name == 'message' and 'chat') or (name == 'presence' and 'available'))", type), { "type", "name" };
+end
 end
 
 function condition_handlers.ENTERING(zone)