comparison mod_firewall/conditions.lib.lua @ 2555:a9eb4d5566f3

mod_firewall: Add TO FULL JID
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 Feb 2017 14:13:57 +0000
parents 19bb4606013f
children 2f1e25706f81
comparison
equal deleted inserted replaced
2554:19bb4606013f 2555: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");