mod_firewall/conditions.lib.lua
changeset 2559 a9eb4d5566f3
parent 2558 19bb4606013f
child 2567 2f1e25706f81
equal deleted inserted replaced
2558:19bb4606013f 2559:a9eb4d5566f3
   265 
   265 
   266 function condition_handlers.SENT_DIRECTED_PRESENCE_TO_SENDER()
   266 function condition_handlers.SENT_DIRECTED_PRESENCE_TO_SENDER()
   267 	return "not not session.directed[from]", { "from" };
   267 	return "not not session.directed[from]", { "from" };
   268 end
   268 end
   269 
   269 
       
   270 function condition_handlers.TO_FULL_JID()
       
   271 	return "not not full_sessions[to]", { "to" };
       
   272 end
       
   273 
   270 -- CHECK LIST: spammers contains $<@from>
   274 -- CHECK LIST: spammers contains $<@from>
   271 function condition_handlers.CHECK_LIST(list_condition)
   275 function condition_handlers.CHECK_LIST(list_condition)
   272 	local list_name, expr = list_condition:match("(%S+) contains (.+)$");
   276 	local list_name, expr = list_condition:match("(%S+) contains (.+)$");
   273 	if not (list_name and expr) then
   277 	if not (list_name and expr) then
   274 		error("Error parsing list check, syntax: LISTNAME contains EXPRESSION");
   278 		error("Error parsing list check, syntax: LISTNAME contains EXPRESSION");