162 function condition_handlers.TO_ADMIN_OF(host) |
162 function condition_handlers.TO_ADMIN_OF(host) |
163 return ("is_admin(bare_to, %s)"):format(host ~= "*" and host or nil), { "is_admin", "bare_to" }; |
163 return ("is_admin(bare_to, %s)"):format(host ~= "*" and host or nil), { "is_admin", "bare_to" }; |
164 end |
164 end |
165 |
165 |
166 function condition_handlers.FROM_ADMIN() |
166 function condition_handlers.FROM_ADMIN() |
167 return ("is_admin(bare_from, from_host)"):format(host ~= "*" and host or nil), { "is_admin", "bare_from", "split_from" }; |
167 return ("is_admin(bare_from, current_host)"), { "is_admin", "bare_from", "current_host" }; |
168 end |
168 end |
169 |
169 |
170 function condition_handlers.TO_ADMIN() |
170 function condition_handlers.TO_ADMIN() |
171 return ("is_admin(bare_to, to_host)"):format(host ~= "*" and host or nil), { "is_admin", "bare_to", "split_to" }; |
171 return ("is_admin(bare_to, current_host)"), { "is_admin", "bare_to", "current_host" }; |
172 end |
172 end |
173 |
173 |
174 local day_numbers = { sun = 0, mon = 2, tue = 3, wed = 4, thu = 5, fri = 6, sat = 7 }; |
174 local day_numbers = { sun = 0, mon = 2, tue = 3, wed = 4, thu = 5, fri = 6, sat = 7 }; |
175 |
175 |
176 local function current_time_check(op, hour, minute) |
176 local function current_time_check(op, hour, minute) |