plugins: Use integer config API with interval specification where sensible

Many of these fall into a few categories:
- util.cache size, must be >= 1
- byte or item counts that logically can't be negative
- port numbers that should be in 1..0xffff
This commit is contained in:
Kim Alvefur 2023-07-17 01:38:54 +02:00
parent 55768509a3
commit 71ad48095d
26 changed files with 48 additions and 47 deletions

View file

@ -1,8 +1,8 @@
module:set_global();
local array = require "prosody.util.array";
local max_buffer_len = module:get_option_number("multiplex_buffer_size", 1024);
local default_mode = module:get_option_number("network_default_read_size", 4096);
local max_buffer_len = module:get_option_integer("multiplex_buffer_size", 1024, 1);
local default_mode = module:get_option_integer("network_default_read_size", 4096, 0);
local portmanager = require "prosody.core.portmanager";