From fcf273b01fa0b7307ae004ce9767c82c477d0e21 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 2 Oct 2018 17:09:45 +0100 Subject: [PATCH] [Minor] Pet luacheck --- src/plugins/lua/spamtrap.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/lua/spamtrap.lua b/src/plugins/lua/spamtrap.lua index f1582f8ce..85af46dd2 100644 --- a/src/plugins/lua/spamtrap.lua +++ b/src/plugins/lua/spamtrap.lua @@ -137,12 +137,6 @@ local function spamtrap_cb(task) end -- Module setup -local opts = rspamd_config:get_all_opt('spamtrap') -if not (opts and type(opts) == 'table') then - rspamd_logger.infox(rspamd_config, 'module is unconfigured') - return -end - local function try_opts(where) local ret = false local opts = rspamd_config:get_all_opt(where) @@ -160,6 +154,12 @@ local function try_opts(where) return ret end +local opts = rspamd_config:get_all_opt('spamtrap') +if not (opts and type(opts) == 'table') then + rspamd_logger.infox(rspamd_config, 'module is unconfigured') + return +end + if not try_opts(M) then try_opts('options') end if opts then -- 2.39.5