diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-08-06 18:25:15 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-08-06 18:25:15 +0100 |
commit | d9c16b50a4f7607cb5f4887fcc3c988f7c28d181 (patch) | |
tree | 4284c8de0a956a30ed70f92c65e24b9da0df5115 /src/lua | |
parent | 54becee5b29dfc2cbda278a7f016fa62eceb996a (diff) | |
download | rspamd-d9c16b50a4f7607cb5f4887fcc3c988f7c28d181.tar.gz rspamd-d9c16b50a4f7607cb5f4887fcc3c988f7c28d181.zip |
Add conditional enabling of modules.
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c index a45f3871d..2f1f645ff 100644 --- a/src/lua/lua_common.c +++ b/src/lua/lua_common.c @@ -294,6 +294,11 @@ rspamd_init_lua_filters (struct rspamd_config *cfg) while (cur) { module = cur->data; if (module->path) { + if (!rspamd_config_is_module_enabled (cfg, module->name)) { + cur = g_list_next (cur); + continue; + } + if (luaL_loadfile (L, module->path) != 0) { msg_info ("load of %s failed: %s", module->path, lua_tostring (L, -1)); |