gboolean
rspamadm_execute_lua_ucl_subr (gpointer pL, gint argc, gchar **argv,
- const ucl_object_t *res, const gchar *script_name)
+ const ucl_object_t *res,
+ const gchar *script_name,
+ gboolean rspamadm_subcommand)
{
lua_State *L = pL;
gint err_idx, i, ret;
/* Init internal rspamadm routines */
- rspamd_snprintf (str, sizeof (str), "return require \"%s.%s\"", "rspamadm",
- script_name);
+ if (rspamadm_subcommand) {
+ rspamd_snprintf (str, sizeof (str), "return require \"%s.%s\"", "rspamadm",
+ script_name);
+ }
+ else {
+ rspamd_snprintf (str, sizeof (str), "return require \"%s\"",
+ script_name);
+ }
if (luaL_dostring (L, str) != 0) {
msg_err ("cannot execute lua script %s: %s",
gboolean rspamadm_execute_lua_ucl_subr (gpointer L, gint argc, gchar **argv,
const ucl_object_t *res,
- const gchar *script_name);
+ const gchar *script_name,
+ gboolean rspamadm_subcommand);
#endif