From: Vsevolod Stakhov Date: Tue, 2 Oct 2018 16:09:45 +0000 (+0100) Subject: [Minor] Pet luacheck X-Git-Tag: 1.8.1~104 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fcf273b01fa0b7307ae004ce9767c82c477d0e21;p=thirdparty%2Frspamd.git [Minor] Pet luacheck --- diff --git a/src/plugins/lua/spamtrap.lua b/src/plugins/lua/spamtrap.lua index f1582f8ce0..85af46dd23 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