Comparison

mod_firewall/conditions.lib.lua @ 4608:4e8fa75cc678

mod_firewall: Remove reliance on full_sessions being a global While it exists as a global now, we want to move away from these globals eventually.
author Kim Alvefur <zash@zash.se>
date Wed, 30 Jun 2021 14:48:59 +0200
parent 3982:ab065ff4628b
child 5002:84997bc3f92e
comparison
equal deleted inserted replaced
4607:c8ccaac78f64 4608:4e8fa75cc678
302 return "not not (session.directed and session.directed[from])", { "from" }; 302 return "not not (session.directed and session.directed[from])", { "from" };
303 end 303 end
304 304
305 -- TO FULL JID? 305 -- TO FULL JID?
306 function condition_handlers.TO_FULL_JID() 306 function condition_handlers.TO_FULL_JID()
307 return "not not full_sessions[to]", { "to" }; 307 return "not not full_sessions[to]", { "to", "full_sessions" };
308 end 308 end
309 309
310 -- CHECK LIST: spammers contains $<@from> 310 -- CHECK LIST: spammers contains $<@from>
311 function condition_handlers.CHECK_LIST(list_condition) 311 function condition_handlers.CHECK_LIST(list_condition)
312 local list_name, expr = list_condition:match("(%S+) contains (.+)$"); 312 local list_name, expr = list_condition:match("(%S+) contains (.+)$");