Freeciv-3.3
Loading...
Searching...
No Matches
Functions
script_fcdb.h File Reference
#include "support.h"
#include "fcdb.h"

Go to the source code of this file.

Functions

bool script_fcdb_init (const char *fcdb_luafile)
 
bool script_fcdb_capstr (void)
 
bool script_fcdb_call (const char *func_name,...)
 
void script_fcdb_free (void)
 
bool script_fcdb_do_string (struct connection *caller, const char *str)
 

Function Documentation

◆ script_fcdb_call()

bool script_fcdb_call ( const char func_name,
  ... 
)

Call a lua function.

Example call to the lua function 'user_load()': success = script_fcdb_call("user_load", pconn);

Definition at line 359 of file script_fcdb.c.

Referenced by auth_handle_reply(), auth_user(), delegate_command(), establish_new_connection(), is_allowed_to_take(), script_fcdb_capstr(), script_fcdb_free(), script_fcdb_init(), and srv_ready().

◆ script_fcdb_capstr()

bool script_fcdb_capstr ( void  )

Check database capabilities for compatibility

Definition at line 324 of file script_fcdb.c.

Referenced by script_fcdb_init().

◆ script_fcdb_do_string()

bool script_fcdb_do_string ( struct connection caller,
const char str 
)

Parse and execute the script in str in the lua instance for the freeciv database.

Definition at line 396 of file script_fcdb.c.

Referenced by fcdb_command().

◆ script_fcdb_free()

void script_fcdb_free ( void  )

Free the scripting data.

Definition at line 377 of file script_fcdb.c.

Referenced by fcdb_command(), and script_fcdb_init().

◆ script_fcdb_init()

bool script_fcdb_init ( const char fcdb_luafile)

Initialize the scripting state. Returns the status of the freeciv database lua state.

Definition at line 239 of file script_fcdb.c.

Referenced by fcdb_command().