Mercurial > prosody-modules
diff mod_firewall/conditions.lib.lua @ 6552:d4da95d6d977
mod_firewall: Fix DAY check for Sunday
Lua refers to Sunday as day 1, not day 0. The other days of the week were
correct, so this seems to have been a typo.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 24 May 2026 19:15:21 +0100 |
| parents | f61564e11d3b |
| children |
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua Sun May 24 18:52:47 2026 +0100 +++ b/mod_firewall/conditions.lib.lua Sun May 24 19:15:21 2026 +0100 @@ -214,7 +214,7 @@ return ("sender_role and sender_role.name == %q"):format(role_name), { "sender_role" }; end -local day_numbers = { sun = 0, mon = 2, tue = 3, wed = 4, thu = 5, fri = 6, sat = 7 }; +local day_numbers = { sun = 1, mon = 2, tue = 3, wed = 4, thu = 5, fri = 6, sat = 7 }; local function current_time_check(op, hour, minute) hour, minute = tonumber(hour), tonumber(minute);
