# HG changeset patch # User Matthew Wild # Date 1487858808 0 # Node ID 7ed2a66bfabd52f88bbab88c86e8c5ebbc6bfff4 # Parent 18b6a55dd5d676a72caa33cca4ab58e79b024d85 mod_firewall: Add TO/FROM ADMIN diff -r 18b6a55dd5d6 -r 7ed2a66bfabd mod_firewall/conditions.lib.lua --- a/mod_firewall/conditions.lib.lua Thu Feb 23 14:05:39 2017 +0000 +++ b/mod_firewall/conditions.lib.lua Thu Feb 23 14:06:48 2017 +0000 @@ -162,6 +162,14 @@ return ("is_admin(bare_to, %s)"):format(host ~= "*" and host or nil), { "is_admin", "bare_to" }; end +function condition_handlers.FROM_ADMIN() + return ("is_admin(bare_from, from_host)"):format(host ~= "*" and host or nil), { "is_admin", "bare_from", "split_from" }; +end + +function condition_handlers.TO_ADMIN() + return ("is_admin(bare_to, to_host)"):format(host ~= "*" and host or nil), { "is_admin", "bare_to", "split_to" }; +end + local day_numbers = { sun = 0, mon = 2, tue = 3, wed = 4, thu = 5, fri = 6, sat = 7 }; local function current_time_check(op, hour, minute)