diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-14 16:03:24 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-14 16:03:24 +0100 |
commit | 104e9476a61286ea9a55e3a975d5049f6a129e60 (patch) | |
tree | 71e469ace31850c1c40583fc23eb2975904ab1a0 /lualib/lua_settings.lua | |
parent | 92beb82231f459ec5b761edb43576670d7b2ae97 (diff) | |
download | rspamd-104e9476a61286ea9a55e3a975d5049f6a129e60.tar.gz rspamd-104e9476a61286ea9a55e3a975d5049f6a129e60.zip |
[Feature] Use `scores` in apply section
Diffstat (limited to 'lualib/lua_settings.lua')
-rw-r--r-- | lualib/lua_settings.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lualib/lua_settings.lua b/lualib/lua_settings.lua index 1c121147c..d03e63e7d 100644 --- a/lualib/lua_settings.lua +++ b/lualib/lua_settings.lua @@ -183,13 +183,13 @@ local function transform_settings_maybe(settings, name) if not senabled[1] then -- Transform map to a list local nlist = {} - if not settings.symbols then - settings.symbols = {} + if not apply.scores then + apply.scores = {} end for k,v in pairs(senabled) do if tonumber(v) then -- Move to symbols as well - settings.symbols[k] = tonumber(v) + apply.scores[k] = tonumber(v) lua_util.debugm('settings', rspamd_config, 'set symbol %s -> %s for settings %s', k, v, name) end @@ -203,7 +203,7 @@ local function transform_settings_maybe(settings, name) if apply.symbols then -- Check if added symbols are enabled - for _,s in ipairs(apply.symbols) do + for _,s in pairs(apply.symbols) do if not symhash[s] then lua_util.debugm('settings', rspamd_config, 'added symbol %s to symbols_enabled for %s', s, name) |