diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-14 15:03:36 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-07-14 15:03:36 +0100 |
commit | bcdb750a8367262090cff00e9215d64315e404d2 (patch) | |
tree | 0538133f78bdf96f985a86e688538df5e09663a0 /src/plugins | |
parent | 36ad4a3924ef58570eda1a19e03ec562298ed58a (diff) | |
download | rspamd-bcdb750a8367262090cff00e9215d64315e404d2.tar.gz rspamd-bcdb750a8367262090cff00e9215d64315e404d2.zip |
[Minor] Fix types
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/ratelimit.lua | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index 7ab688ebf..839ec5c6c 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -447,7 +447,9 @@ local function ratelimit_cb(task) if ret then local bucket = parse_limit(k, bd) - prefixes[redis_key] = make_prefix(redis_key, k, bucket) + if bucket[1] then + prefixes[redis_key] = make_prefix(redis_key, k, bucket[1]) + end nprefixes = nprefixes + 1 else rspamd_logger.errx(task, 'cannot call handler for %s: %s', @@ -664,14 +666,6 @@ if opts then name = 'RATELIMIT_UPDATE', callback = ratelimit_update_cb, } - - if settings.custom_keywords then - for _, v in pairs(settings.custom_keywords) do - if type(v) == 'table' and type(v['init']) == 'function' then - v['init']() - end - end - end end end |