Freeciv-3.1
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_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 301 of file script_fcdb.c.

Referenced by auth_handle_reply(), auth_user(), delegate_command(), is_allowed_to_take(), script_fcdb_free(), and 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 338 of file script_fcdb.c.

Referenced by fcdb_command().

◆ script_fcdb_free()

void script_fcdb_free ( void  )

Free the scripting data.

Definition at line 319 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 222 of file script_fcdb.c.

Referenced by fcdb_command().