]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Small style improvements in external services
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 Jan 2019 10:19:39 +0000 (10:19 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 3 Jan 2019 10:19:39 +0000 (10:19 +0000)
lualib/lua_scanners/dcc.lua
src/plugins/lua/antivirus.lua

index f7bef47b21972999ead9e313b50c4095637d9af2..b6c3d552f4033d550a370344a98be789f49b370d 100644 (file)
@@ -271,7 +271,7 @@ local function dcc_config(opts)
       dcc_conf.default_port)
 
   if dcc_conf.upstreams then
-    lua_util.add_debug_alias('ext_scanners', N)
+    lua_util.add_debug_alias('external_services', N)
     return dcc_conf
   end
 
index 9e142cb8258c709d666ca50568bac0c58845fe4d..2f8f948ad0c43f1cc986e4af156426ef7ff90117 100644 (file)
@@ -157,9 +157,9 @@ local function add_antivirus_rule(sym, opts)
 end
 
 -- Registration
-local opts = rspamd_config:get_all_opt('antivirus')
+local opts = rspamd_config:get_all_opt(N)
 if opts and type(opts) == 'table' then
-  redis_params = rspamd_parse_redis_server('antivirus')
+  redis_params = rspamd_parse_redis_server(N)
   local has_valid = false
   for k, m in pairs(opts) do
     if type(m) == 'table' and m.servers then
@@ -174,14 +174,14 @@ if opts and type(opts) == 'table' then
           name = m['symbol'],
           callback = cb,
           score = 0.0,
-          group = 'antivirus'
+          group = N
         })
         rspamd_config:register_symbol({
           type = 'virtual',
           name = m['symbol_fail'],
           parent = id,
           score = 0.0,
-          group = 'antivirus'
+          group = N
         })
         has_valid = true
         if type(m['patterns']) == 'table' then
@@ -194,11 +194,13 @@ if opts and type(opts) == 'table' then
                     name = sym,
                     parent = m['symbol'],
                     parent_id = id,
+                    group = N
                   })
                   rspamd_config:register_symbol({
                     type = 'virtual',
                     name = sym,
-                    parent = id
+                    parent = id,
+                    group = N
                   })
                 end
               end
@@ -208,7 +210,8 @@ if opts and type(opts) == 'table' then
               rspamd_config:register_symbol({
                 type = 'virtual',
                 name = sym,
-                parent = id
+                parent = id,
+                group = N
               })
             end
           end
@@ -216,7 +219,7 @@ if opts and type(opts) == 'table' then
         if m['score'] then
           -- Register metric symbol
           local description = 'antivirus symbol'
-          local group = 'antivirus'
+          local group = N
           if m['description'] then
             description = m['description']
           end