diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-11-29 20:16:42 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-11-29 20:16:42 +0000 |
commit | dd4e6a1cacca1828cc648f86e1485bfc5b6da092 (patch) | |
tree | 4a181c0cfed99977e7f77539afae0219c6dbb32c | |
parent | f11009eaed8417cf741047bbbd76b47eff7d6c28 (diff) | |
download | rspamd-dd4e6a1cacca1828cc648f86e1485bfc5b6da092.tar.gz rspamd-dd4e6a1cacca1828cc648f86e1485bfc5b6da092.zip |
[Minor] Remove obsoleted global function
-rw-r--r-- | .luacheckrc | 1 | ||||
-rw-r--r-- | src/plugins/lua/clickhouse.lua | 3 | ||||
-rw-r--r-- | src/plugins/lua/once_received.lua | 3 | ||||
-rw-r--r-- | src/plugins/lua/reputation.lua | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/.luacheckrc b/.luacheckrc index e0543a5a3..099d9ab65 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -24,7 +24,6 @@ globals = { 'rspamd_redis_make_request', 'rspamd_str_split', 'rspamd_version', - 'rspamd_map_add', 'rspamd_maps', 'rspamd_plugins_state', 'rspamadm', diff --git a/src/plugins/lua/clickhouse.lua b/src/plugins/lua/clickhouse.lua index ce1749874..6deaa3112 100644 --- a/src/plugins/lua/clickhouse.lua +++ b/src/plugins/lua/clickhouse.lua @@ -1389,7 +1389,8 @@ if opts then rspamd_logger.infox(rspamd_config, 'no servers are specified, disabling module') lua_util.disable_module(N, "config") else - settings['from_map'] = rspamd_map_add('clickhouse', 'from_tables', + local lua_maps = require "lua_maps" + settings['from_map'] = lua_maps.map_add('clickhouse', 'from_tables', 'regexp', 'clickhouse specific domains') settings.upstream = upstream_list.create(rspamd_config, diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua index def82ebb8..0fe738d63 100644 --- a/src/plugins/lua/once_received.lua +++ b/src/plugins/lua/once_received.lua @@ -196,7 +196,8 @@ if opts then good_hosts = v end elseif n == 'whitelist' then - whitelist = rspamd_map_add('once_received', 'whitelist', 'radix', + local lua_maps = require "lua_maps" + whitelist = lua_maps.map_add('once_received', 'whitelist', 'radix', 'once received whitelist') elseif n == 'symbol_mx' then symbol_mx = v diff --git a/src/plugins/lua/reputation.lua b/src/plugins/lua/reputation.lua index 3db6c52c7..900dc04eb 100644 --- a/src/plugins/lua/reputation.lua +++ b/src/plugins/lua/reputation.lua @@ -410,7 +410,7 @@ local function ip_reputation_init(rule) local cfg = rule.selector.config if cfg.asn_cc_whitelist then - cfg.asn_cc_whitelist = rspamd_map_add('reputation', + cfg.asn_cc_whitelist = lua_maps.map_add('reputation', 'asn_cc_whitelist', 'map', 'IP score whitelisted ASNs/countries') |