aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_config.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-10-09 20:53:52 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-10-09 20:53:52 +0100
commit05ccc9c195c44da6fd2be6087fbca674f0df51b3 (patch)
treeb1e763193bb30275119be3bc926de16a347297e3 /src/lua/lua_config.c
parent2e2c66f6be03c03de7696918cc222047c70e9747 (diff)
downloadrspamd-05ccc9c195c44da6fd2be6087fbca674f0df51b3.tar.gz
rspamd-05ccc9c195c44da6fd2be6087fbca674f0df51b3.zip
[Minor] Allow to add custom maps from ucl in Lua
Diffstat (limited to 'src/lua/lua_config.c')
-rw-r--r--src/lua/lua_config.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c
index f12b7504e..17eeeaf29 100644
--- a/src/lua/lua_config.c
+++ b/src/lua/lua_config.c
@@ -111,6 +111,12 @@ local function foo(task)
end
*/
/***
+* @method rspamd_config:radix_from_ucl(obj)
+* Creates new embedded map of IP/mask addresses from object.
+* @param {ucl} obj object
+* @return {map} radix tree object
+*/
+/***
* @method rspamd_config:add_hash_map(mapline[, description])
* Creates new dynamic map string objects.
* @param {string} mapline URL for a map
@@ -655,6 +661,7 @@ static const struct luaL_reg configlib_m[] = {
LUA_INTERFACE_DEF (config, get_ucl),
LUA_INTERFACE_DEF (config, add_radix_map),
LUA_INTERFACE_DEF (config, radix_from_config),
+ LUA_INTERFACE_DEF (config, radix_from_ucl),
LUA_INTERFACE_DEF (config, add_hash_map),
LUA_INTERFACE_DEF (config, add_kv_map),
LUA_INTERFACE_DEF (config, add_map),