From: Vsevolod Stakhov Date: Thu, 3 Jan 2019 10:19:39 +0000 (+0000) Subject: [Minor] Small style improvements in external services X-Git-Tag: 1.9.0~357 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=55707db64993bb2f8422c404a0bb2005e9759217;p=rspamd.git [Minor] Small style improvements in external services --- diff --git a/lualib/lua_scanners/dcc.lua b/lualib/lua_scanners/dcc.lua index f7bef47b2..b6c3d552f 100644 --- a/lualib/lua_scanners/dcc.lua +++ b/lualib/lua_scanners/dcc.lua @@ -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 diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 9e142cb82..2f8f948ad 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -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