Comparison

plugins/mod_limits.lua @ 10111:0f335815244f

plugins: Remove tostring call from logging Taken care of by loggingmanager now Mass-rewrite using lua pattern like `tostring%b()`
author Kim Alvefur <zash@zash.se>
date Tue, 30 Jul 2019 02:29:36 +0200
parent 10099:7e3196e0263e
child 10551:27b275633156
comparison
equal deleted inserted replaced
10110:3fa3872588a8 10111:0f335815244f
30 if type(burst) == "string" then 30 if type(burst) == "string" then
31 burst = burst:match("^(%d+) ?s$"); 31 burst = burst:match("^(%d+) ?s$");
32 end 32 end
33 local n_burst = tonumber(burst); 33 local n_burst = tonumber(burst);
34 if not n_burst then 34 if not n_burst then
35 module:log("error", "Unable to parse burst for %s: %q, using default burst interval (%ds)", sess_type, tostring(burst), default_burst); 35 module:log("error", "Unable to parse burst for %s: %q, using default burst interval (%ds)", sess_type, burst, default_burst);
36 end 36 end
37 return n_burst or default_burst; 37 return n_burst or default_burst;
38 end 38 end
39 39
40 -- Process config option into limits table: 40 -- Process config option into limits table: