diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-07 12:42:09 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-07 12:42:09 +0100 |
commit | 1e84018e2a508ae6c62baf39c2046699ef5b5a52 (patch) | |
tree | 5d860de785fdc4604c0ba3727f7f5eef6b902550 /src/plugins/lua | |
parent | 416ba555dd278fa771ca862e174b578ad4bba958 (diff) | |
download | rspamd-1e84018e2a508ae6c62baf39c2046699ef5b5a52.tar.gz rspamd-1e84018e2a508ae6c62baf39c2046699ef5b5a52.zip |
[Minor] Move config stuff out
Diffstat (limited to 'src/plugins/lua')
-rw-r--r-- | src/plugins/lua/antivirus.lua | 2 | ||||
-rw-r--r-- | src/plugins/lua/bimi.lua | 2 | ||||
-rw-r--r-- | src/plugins/lua/reputation.lua | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 44fe10e98..e39ddc5ba 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -204,7 +204,7 @@ if opts and type(opts) == 'table' then if not cb then rspamd_logger.errx(rspamd_config, 'cannot add rule: "' .. k .. '"') - lua_util.push_config_error(N, 'cannot add AV rule: "' .. k .. '"') + lua_util.config_utils.push_config_error(N, 'cannot add AV rule: "' .. k .. '"') else rspamd_logger.infox(rspamd_config, 'added antivirus engine %s -> %s', k, m.symbol) local t = { diff --git a/src/plugins/lua/bimi.lua b/src/plugins/lua/bimi.lua index 5959f59e7..5dbb83623 100644 --- a/src/plugins/lua/bimi.lua +++ b/src/plugins/lua/bimi.lua @@ -354,7 +354,7 @@ local res, err = settings_schema:transform(settings) if not res then rspamd_logger.warnx(rspamd_config, 'plugin is misconfigured: %s', err) local err_msg = string.format("schema error: %s", res) - lua_util.push_config_error(N, err_msg) + lua_util.config_utils.push_config_error(N, err_msg) lua_util.disable_module(N, "failed", err_msg) return end diff --git a/src/plugins/lua/reputation.lua b/src/plugins/lua/reputation.lua index d569e9070..fc7001eb1 100644 --- a/src/plugins/lua/reputation.lua +++ b/src/plugins/lua/reputation.lua @@ -1377,10 +1377,10 @@ if opts['rules'] then for k, v in pairs(opts['rules']) do if not ((v or E).selector) then rspamd_logger.errx(rspamd_config, "no selector defined for rule %s", k) - lua_util.push_config_error(N, "no selector defined for rule: " .. k) + lua_util.config_utils.push_config_error(N, "no selector defined for rule: " .. k) else if not parse_rule(k, v) then - lua_util.push_config_error(N, "reputation rule is misconfigured: " .. k) + lua_util.config_utils.push_config_error(N, "reputation rule is misconfigured: " .. k) end end end |