]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Doc] Discourage old brain damaged method of symbols registration
authorVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 2 Sep 2024 14:45:12 +0000 (15:45 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Mon, 2 Sep 2024 14:45:12 +0000 (15:45 +0100)
src/lua/lua_config.c

index fc068270ecc53d3afc247813033ead7e57376cee..be5822c7a23f53dac4a6775246b4297c46234e27 100644 (file)
 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