${CMAKE_CURRENT_SOURCE_DIR}/lua_map.c)
SET(RSPAMD_LUA ${LUASRC} PARENT_SCOPE)
-SET(RSPAMDMLUASRC "")
+SET(RSPAMDMLUASRC "${CMAKE_CURRENT_SOURCE_DIR}/global_functions.lua")
ADD_CUSTOM_TARGET(rspamd_lua_preprocess
${PERL_EXECUTABLE}
"${CMAKE_SOURCE_DIR}/lua_preprocess.pl"
* limitations under the License.
*/
#include "lua_common.h"
+#include "lua/global_functions.lua.h"
/* Lua module init function */
#define MODULE_INIT_FUNC "module_init"
rspamd_lua_add_preload (L, "ucl", luaopen_ucl);
+ if (luaL_dostring (L, rspamadm_script_global_functions) != 0) {
+ msg_err ("cannot execute lua global script: %s",
+ lua_tostring (L, -1));
+ }
+
return L;
}