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/libserver/cfg_utils.c | |
parent | 54becee5b29dfc2cbda278a7f016fa62eceb996a (diff) | |
download | rspamd-d9c16b50a4f7607cb5f4887fcc3c988f7c28d181.tar.gz rspamd-d9c16b50a4f7607cb5f4887fcc3c988f7c28d181.zip |
Add conditional enabling of modules.
Diffstat (limited to 'src/libserver/cfg_utils.c')
-rw-r--r-- | src/libserver/cfg_utils.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/libserver/cfg_utils.c b/src/libserver/cfg_utils.c index 96beb0621..1fe7d1483 100644 --- a/src/libserver/cfg_utils.c +++ b/src/libserver/cfg_utils.c @@ -1059,15 +1059,8 @@ rspamd_config_is_module_enabled (struct rspamd_config *cfg, conf = ucl_object_find_key (cfg->rcl_obj, module_name); if (conf == NULL) { - if (is_c) { - msg_info ("internal module %s is enabled but has not configured", - module_name); - } - else { - msg_info ("lua module %s is disabled as it has not configured", - module_name); - return FALSE; - } + msg_info ("%s module %s is enabled but has not been configured", + is_c ? "internal" : "lua", module_name); } else { enabled = ucl_object_find_key (conf, "enabled"); @@ -1087,7 +1080,7 @@ rspamd_config_is_module_enabled (struct rspamd_config *cfg, if (gr) { if (gr->disabled) { msg_info ("%s module %s is disabled in the configuration as " - "its group is disabled", + "its group has been disabled", is_c ? "internal" : "lua", module_name); return FALSE; } |