mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 13:47:41 +03:00
plugins: Switch to :get_option_period() for time range options
Improves readability ("1 day" vs 86400) and centralizes validation.
This commit is contained in:
parent
903e945d09
commit
1987a7411f
18 changed files with 24 additions and 38 deletions
|
@ -7,7 +7,7 @@ local timer = require "prosody.util.timer";
|
|||
local ceil = math.ceil;
|
||||
|
||||
local limits_cfg = module:get_option("limits", {});
|
||||
local limits_resolution = module:get_option_number("limits_resolution", 1);
|
||||
local limits_resolution = module:get_option_period("limits_resolution", 1);
|
||||
|
||||
local default_bytes_per_second = 3000;
|
||||
local default_burst = 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue