aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-09-02 15:45:12 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-09-02 15:45:12 +0100
commitffe690f0369dddec7930edd7a0533a597c6abc1c (patch)
tree4071a965ee560f43be6036fd2deab00149367a15 /src/lua
parent685eb3e05ecf1b3e8a7f02fd95f1bae3c099302f (diff)
downloadrspamd-ffe690f0369dddec7930edd7a0533a597c6abc1c.tar.gz
rspamd-ffe690f0369dddec7930edd7a0533a597c6abc1c.zip
[Doc] Discourage old brain damaged method of symbols registration
Diffstat (limited to 'src/lua')
-rw-r--r--src/lua/lua_config.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c
index fc068270e..be5822c7a 100644
--- a/src/lua/lua_config.c
+++ b/src/lua/lua_config.c
@@ -34,7 +34,11 @@
local function foo(task)
-- do something
end
-rspamd_config:register_symbol('SYMBOL', 1.0, foo)
+rspamd_config:register_symbol{
+ name = 'SYMBOL',
+ score = 1.0,
+ callback = foo
+}
-- Get configuration
local tab = rspamd_config:get_all_opt('module') -- get table for module's options