diff mod_firewall/conditions.lib.lua @ 2537:acdc1767a715

mod_firewall: Make parameter to 'IN ROSTER' optional
author Matthew Wild <mwild1@gmail.com>
date Tue, 21 Feb 2017 10:37:10 +0000
parents 13b8c31dce01
children 9b46d24edf0d
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua	Mon Feb 20 13:13:54 2017 +0000
+++ b/mod_firewall/conditions.lib.lua	Tue Feb 21 10:37:10 2017 +0000
@@ -100,8 +100,9 @@
 	return zone_check(zone, "from");
 end
 
+-- IN ROSTER? (parameter is deprecated)
 function condition_handlers.IN_ROSTER(yes_no)
-	local in_roster_requirement = string_to_boolean(yes_no);
+	local in_roster_requirement = string_to_boolean(yes_no or "yes"); -- COMPAT w/ older scripts
 	return "not "..(in_roster_requirement and "not" or "").." roster_entry", { "roster_entry" };
 end