diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-30 17:57:59 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-30 17:57:59 +0400 |
commit | dd2fbb7a5b7e1c0d844900147486ad7ffd98c1e4 (patch) | |
tree | ab8bfcf6c21bd8a47f49b9f9331378e6454e90cf /src/cfg_file.y | |
parent | c72912310c575a5ba7e7e50a5fdd425f3a4e4dbc (diff) | |
download | rspamd-dd2fbb7a5b7e1c0d844900147486ad7ffd98c1e4.tar.gz rspamd-dd2fbb7a5b7e1c0d844900147486ad7ffd98c1e4.zip |
* Add message handling functions to lua API
* Add ability to add lua code in config with .lua and .endlua
* Add consolidation functions support that are written in perl or lua
Diffstat (limited to 'src/cfg_file.y')
-rw-r--r-- | src/cfg_file.y | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cfg_file.y b/src/cfg_file.y index 5cd98e9fc..b62b6b5b4 100644 --- a/src/cfg_file.y +++ b/src/cfg_file.y @@ -8,6 +8,11 @@ #include "expressions.h" #include "classifiers/classifiers.h" #include "tokenizers/tokenizers.h" +#ifdef WITH_LUA +#include "lua-rspamd.h" +#else +#include "perl.h" +#endif #define YYDEBUG 1 @@ -323,6 +328,11 @@ metricfunction: cur_metric = memory_pool_alloc0 (cfg->cfg_pool, sizeof (struct metric)); } cur_metric->func_name = memory_pool_strdup (cfg->cfg_pool, $3); +#ifdef WITH_LUA + cur_metric->func = lua_consolidation_func; +#else + cur_metric->func = perl_consolidation_func; +#endif } ; |