local local_conf = rspamd_paths['CONFDIR']
local local_rules = rspamd_paths['RULESDIR']
+dofile(local_rules .. '/global_functions.lua')
dofile(local_rules .. '/regexp/headers.lua')
dofile(local_rules .. '/regexp/lotto.lua')
dofile(local_rules .. '/regexp/fraud.lua')
IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
ADD_DEPENDENCIES(rspamd-server rspamd-clang)
ENDIF()
-ADD_DEPENDENCIES(rspamd-server rspamd_lua_preprocess)
ADD_EXECUTABLE(rspamd ${RSPAMDSRC} ${CMAKE_CURRENT_BINARY_DIR}/workers.c)
SET_TARGET_PROPERTIES(rspamd PROPERTIES LINKER_LANGUAGE C)
${CMAKE_CURRENT_SOURCE_DIR}/lua_cryptobox.c
${CMAKE_CURRENT_SOURCE_DIR}/lua_map.c)
-SET(RSPAMD_LUA ${LUASRC} PARENT_SCOPE)
-SET(RSPAMDMLUASRC "${CMAKE_CURRENT_SOURCE_DIR}/global_functions.lua")
-ADD_CUSTOM_TARGET(rspamd_lua_preprocess
- ${PERL_EXECUTABLE}
- "${CMAKE_SOURCE_DIR}/lua_preprocess.pl"
- "${CMAKE_CURRENT_SOURCE_DIR}"
- "${CMAKE_CURRENT_BINARY_DIR}"
- SOURCES ${RSPAMDMLUASRC} ${CMAKE_SOURCE_DIR}/lua_preprocess.pl)
\ No newline at end of file
+SET(RSPAMD_LUA ${LUASRC} PARENT_SCOPE)
\ No newline at end of file
* limitations under the License.
*/
#include "lua_common.h"
-#include "lua/global_functions.lua.h"
#include "lptree.h"
#include "utlist.h"
#include <math.h>
rspamd_lua_new_class (L, "rspamd{worker}", worker_reg);
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));
- }
-
/* Add plugins global */
lua_newtable (L);
lua_setglobal (L, "rspamd_plugins");