78 const char *format, ...)
162 const char *filename)
173 fcl->caller = caller;
197 const char *filename)
271 const char *
section =
"script.code";
611 const char *format, ...)
struct @126::my_agent::@127 stats
int api_game_specenum_open(lua_State *L)
#define fc_assert_ret_val(condition, val)
#define log_fatal(message,...)
void luascript_remove_exported_object(struct fc_lua *fcl, void *object)
int luascript_do_string(struct fc_lua *fcl, const char *str, const char *name)
int luascript_do_file(struct fc_lua *fcl, const char *filename)
void luascript_vars_load(struct fc_lua *fcl, struct section_file *file, const char *section)
void luascript_vars_save(struct fc_lua *fcl, struct section_file *file, const char *section)
struct fc_lua * luascript_new(luascript_log_func_t output_fct, bool secured_environment)
void luascript_destroy(struct fc_lua *fcl)
void(* luascript_log_func_t)(struct fc_lua *fcl, enum log_level level, const char *format,...) fc__attribute((__format__(__printf__
bool luascript_func_call_valist(struct fc_lua *fcl, const char *func_name, va_list args)
void luascript_func_init(struct fc_lua *fcl)
void luascript_func_add(struct fc_lua *fcl, const char *func_name, bool required, int nargs, int nreturns,...)
void luascript_signal_init(struct fc_lua *fcl)
void deprecate_signal(struct signal_deprecator *deprecator, char *signal_name, char *replacement, char *deprecated_since, char *retired_since)
struct signal_deprecator * luascript_signal_create(struct fc_lua *fcl, const char *signal_name, int nargs,...)
void luascript_signal_emit_valist(struct fc_lua *fcl, const char *signal_name, va_list args)
const char * secfile_lookup_str_default(const struct section_file *secfile, const char *def, const char *path,...)
#define secfile_insert_str_noescape(secfile, string, path,...)
static bool script_server_do_file_shared(struct fc_lua *fcl, struct connection *caller, const char *filename)
bool script_server_unsafe_do_string(struct connection *caller, const char *str)
static char * script_server_code
static void script_server_vars_free(void)
static void static bool script_server_do_string_shared(struct fc_lua *fcl, struct connection *caller, const char *str)
void script_server_signal_emit(const char *signal_name,...)
bool script_server_do_string(struct connection *caller, const char *str)
static void script_server_vars_load(struct section_file *file)
static struct fc_lua * fcl_main
bool script_server_init(void)
static void script_server_vars_init(void)
bool script_server_call(const char *func_name,...)
static void script_server_code_save(struct section_file *file)
static void script_server_code_init(void)
static void script_server_cmd_reply(struct fc_lua *fcl, enum log_level level, const char *format,...) fc__attribute((__format__(__printf__
void script_server_state_save(struct section_file *file)
static void script_server_vars_save(struct section_file *file)
static void script_server_code_free(void)
void script_server_state_load(struct section_file *file)
void script_server_remove_exported_object(void *object)
static struct fc_lua * fcl_unsafe
static void script_server_functions_define(void)
static void script_server_code_load(struct section_file *file)
bool script_server_unsafe_do_file(struct connection *caller, const char *filename)
static void script_server_signals_create(void)
bool script_server_load_file(const char *filename, char **buf)
void script_server_free(void)
bool script_server_do_file(struct connection *caller, const char *filename)
struct setting_list * level[OLEVELS_NUM]
void cmd_reply(enum command_id cmd, struct connection *caller, enum rfc_status rfc_status, const char *format,...)
struct connection * caller
int fc_vsnprintf(char *str, size_t n, const char *format, va_list ap)
FILE * fc_fopen(const char *filename, const char *opentype)
int fc_stat(const char *filename, struct stat *buf)
TOLUA_API int tolua_common_a_open(lua_State *tolua_S)
TOLUA_API int tolua_common_z_open(lua_State *tolua_S)
TOLUA_API int tolua_game_open(lua_State *tolua_S)
TOLUA_API int tolua_server_open(lua_State *tolua_S)
TOLUA_API int tolua_signal_open(lua_State *tolua_S)