diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-24 11:58:32 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-24 11:58:32 +0000 |
commit | e6b6f6bb9c0d29c261e2c4c9457b552b82317136 (patch) | |
tree | 9f5acd9d46e30753fd844bda793284310b89b768 /src/plugins/lua/ratelimit.lua | |
parent | e8736ad3af56d9e8087e768d49b960c351732b9e (diff) | |
download | rspamd-e6b6f6bb9c0d29c261e2c4c9457b552b82317136.tar.gz rspamd-e6b6f6bb9c0d29c261e2c4c9457b552b82317136.zip |
[Rework] Use new maps add function
Diffstat (limited to 'src/plugins/lua/ratelimit.lua')
-rw-r--r-- | src/plugins/lua/ratelimit.lua | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index a05ebc2e9..32b2ba2d4 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -528,15 +528,13 @@ if opts then end if opts['whitelisted_ip'] then - whitelisted_ip = rspamd_config:add_radix_map(opts['whitelisted_ip'], 'Ratelimit whitelist ip map') + whitelisted_ip = rspamd_map_add('ratelimit', 'whitelisted_ip', 'radix', + 'Ratelimit whitelist ip map') end if opts['whitelisted_user'] then - whitelisted_user = rspamd_config:add_map({ - ['url'] = opts['whitelisted_user'], - ['description'] = 'Ratelimit whitelist user map', - ['type'] = 'set' - }) + whitelisted_ip = rspamd_map_add('ratelimit', 'whitelisted_user', 'set', + 'Ratelimit whitelist user map') end if opts['symbol'] then |