Mercurial > prosody-modules
changeset 6372:81f06628fea4
mod_firewall: Switch to prosody.util.time.now() to get the current time
| author | Link Mauve <linkmauve@linkmauve.fr> |
|---|---|
| date | Fri, 30 Jan 2026 15:03:21 +0100 |
| parents | caaa9ea58bec |
| children | d5c7be7e73ca |
| files | mod_firewall/mod_firewall.lua |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua Tue Jan 27 21:12:21 2026 +0100 +++ b/mod_firewall/mod_firewall.lua Fri Jan 30 15:03:21 2026 +0100 @@ -204,7 +204,7 @@ end return table.concat(defs, " "); end, depends = { "date_time" }; }; - timestamp = { global_code = [[local get_time = require "socket".gettime;]]; local_code = [[local current_timestamp = get_time();]]; }; + timestamp = { global_code = [[local get_time = require "prosody.util.time".now;]]; local_code = [[local current_timestamp = get_time();]]; }; globalthrottle = { global_code = function (throttle) assert(idsafe(throttle), "Invalid rate limit name: "..throttle);
