mod_firewall/conditions: Default types for message and presence
authorMatthew Wild <mwild1@gmail.com>
Fri, 05 Apr 2013 19:20:05 +0100
changeset 964 04e85eb3dfef
parent 963 c7fca2c9e24f
child 965 d4e24fb289c0
mod_firewall/conditions: Default types for message and presence
mod_firewall/conditions.lib.lua
--- 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)