]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Remove obsoleted global function
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 29 Nov 2022 20:16:42 +0000 (20:16 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 29 Nov 2022 20:16:42 +0000 (20:16 +0000)
.luacheckrc
src/plugins/lua/clickhouse.lua
src/plugins/lua/once_received.lua
src/plugins/lua/reputation.lua

index e0543a5a3dd8bf84594ace21b02a4997318f3a3e..099d9ab6591e559f46b67707656e3bb17e4477ae 100644 (file)
@@ -24,7 +24,6 @@ globals = {
   'rspamd_redis_make_request',
   'rspamd_str_split',
   'rspamd_version',
-  'rspamd_map_add',
   'rspamd_maps',
   'rspamd_plugins_state',
   'rspamadm',
index ce17498743f348c1b6b2002a8db4268700be1816..6deaa31124e84daa329a29a99c5a82aec2e37bf0 100644 (file)
@@ -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,
index def82ebb8dc8e53b276f1c2651e8bbdbc3e5ccd9..0fe738d630148da016e014578dd7f1edbe5800d0 100644 (file)
@@ -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
index 3db6c52c7498b1fccc375a8ea5160513746b43e5..900dc04eb9c7c33739288fc2ef362a2280332922 100644 (file)
@@ -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')