Minetest  5.4.0
ModApiServer Class Reference

#include <l_server.h>

+ Inheritance diagram for ModApiServer:
+ Collaboration diagram for ModApiServer:

Static Public Member Functions

static void Initialize (lua_State *L, int top)
 
- Static Public Member Functions inherited from ModApiBase
static ScriptApiBasegetScriptApiBase (lua_State *L)
 
static ServergetServer (lua_State *L)
 
static ServerInventoryManagergetServerInventoryMgr (lua_State *L)
 
static ClientgetClient (lua_State *L)
 
static GUIEnginegetGuiEngine (lua_State *L)
 
static IGameDefgetGameDef (lua_State *L)
 
static EnvironmentgetEnv (lua_State *L)
 
static std::string getCurrentModPath (lua_State *L)
 
template<typename T >
static T * getScriptApi (lua_State *L)
 
static bool registerFunction (lua_State *L, const char *name, lua_CFunction func, int top)
 
static int l_deprecated_function (lua_State *L, const char *good, const char *bad, lua_CFunction func)
 A wrapper for deprecated functions. More...
 

Static Private Member Functions

static int l_request_shutdown (lua_State *L)
 
static int l_get_server_status (lua_State *L)
 
static int l_get_server_uptime (lua_State *L)
 
static int l_get_worldpath (lua_State *L)
 
static int l_is_singleplayer (lua_State *L)
 
static int l_get_current_modname (lua_State *L)
 
static int l_get_modpath (lua_State *L)
 
static int l_get_modnames (lua_State *L)
 
static int l_print (lua_State *L)
 
static int l_chat_send_all (lua_State *L)
 
static int l_chat_send_player (lua_State *L)
 
static int l_show_formspec (lua_State *L)
 
static int l_sound_play (lua_State *L)
 
static int l_sound_stop (lua_State *L)
 
static int l_sound_fade (lua_State *L)
 
static int l_dynamic_add_media_raw (lua_State *L)
 
static int l_get_player_privs (lua_State *L)
 
static int l_get_player_ip (lua_State *L)
 
static int l_get_player_information (lua_State *L)
 
static int l_get_ban_list (lua_State *L)
 
static int l_get_ban_description (lua_State *L)
 
static int l_ban_player (lua_State *L)
 
static int l_unban_player_or_ip (lua_State *L)
 
static int l_kick_player (lua_State *L)
 
static int l_remove_player (lua_State *L)
 
static int l_notify_authentication_modified (lua_State *L)
 
static int l_get_last_run_mod (lua_State *L)
 
static int l_set_last_run_mod (lua_State *L)
 

Additional Inherited Members

- Protected Member Functions inherited from LuaHelper
template<>
bool readParam (lua_State *L, int index)
 
- Static Protected Member Functions inherited from LuaHelper
static bool isNaN (lua_State *L, int idx)
 
template<typename T >
static T readParam (lua_State *L, int index)
 Read a value using a template type T from Lua State L and index. More...
 
template<typename T >
static T readParam (lua_State *L, int index, const T &default_value)
 Read a value using a template type T from Lua State L and index. More...
 

Member Function Documentation

◆ Initialize()

void ModApiServer::Initialize ( lua_State *  L,
int  top 
)
static

References API_FCT.

Referenced by ServerScripting::InitializeModApi().

+ Here is the caller graph for this function:

◆ l_ban_player()

int ModApiServer::l_ban_player ( lua_State *  L)
staticprivate

References RemotePlayer::getPeerId(), ModApiBase::getServer(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_chat_send_all()

int ModApiServer::l_chat_send_all ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, and utf8_to_wide().

+ Here is the call graph for this function:

◆ l_chat_send_player()

int ModApiServer::l_chat_send_player ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, and utf8_to_wide().

+ Here is the call graph for this function:

◆ l_dynamic_add_media_raw()

int ModApiServer::l_dynamic_add_media_raw ( lua_State *  L)
staticprivate

References CHECK_SECURE_PATH, Server::dynamicAddMedia(), ModApiBase::getEnv(), ModApiBase::getServer(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_get_ban_description()

int ModApiServer::l_get_ban_description ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_get_ban_list()

int ModApiServer::l_get_ban_list ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_get_current_modname()

int ModApiServer::l_get_current_modname ( lua_State *  L)
staticprivate

◆ l_get_last_run_mod()

int ModApiServer::l_get_last_run_mod ( lua_State *  L)
staticprivate

References CUSTOM_RIDX_CURRENT_MOD_NAME, ModApiBase::getScriptApiBase(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_get_modnames()

int ModApiServer::l_get_modnames ( lua_State *  L)
staticprivate

References Server::getModNames(), ModApiBase::getServer(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_get_modpath()

int ModApiServer::l_get_modpath ( lua_State *  L)
staticprivate

References Server::getModSpec(), ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, and ModSpec::path.

+ Here is the call graph for this function:

◆ l_get_player_information()

◆ l_get_player_ip()

int ModApiServer::l_get_player_ip ( lua_State *  L)
staticprivate

References RemotePlayer::getPeerId(), ModApiBase::getServer(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_get_player_privs()

int ModApiServer::l_get_player_privs ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, and table.

+ Here is the call graph for this function:

◆ l_get_server_status()

int ModApiServer::l_get_server_status ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_get_server_uptime()

int ModApiServer::l_get_server_uptime ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_get_worldpath()

int ModApiServer::l_get_worldpath ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), Server::getWorldPath(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_is_singleplayer()

int ModApiServer::l_is_singleplayer ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_kick_player()

int ModApiServer::l_kick_player ( lua_State *  L)
staticprivate

References Server::DenyAccess_Legacy(), ModApiBase::getEnv(), RemotePlayer::getPeerId(), ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, and utf8_to_wide().

+ Here is the call graph for this function:

◆ l_notify_authentication_modified()

int ModApiServer::l_notify_authentication_modified ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, and Server::reportPrivsModified().

+ Here is the call graph for this function:

◆ l_print()

int ModApiServer::l_print ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, and Server::printToConsoleOnly().

+ Here is the call graph for this function:

◆ l_remove_player()

int ModApiServer::l_remove_player ( lua_State *  L)
staticprivate

References ModApiBase::getEnv(), ServerEnvironment::getPlayer(), NO_MAP_LOCK_REQUIRED, and ServerEnvironment::removePlayerFromDatabase().

+ Here is the call graph for this function:

◆ l_request_shutdown()

int ModApiServer::l_request_shutdown ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, and Server::requestShutdown().

+ Here is the call graph for this function:

◆ l_set_last_run_mod()

int ModApiServer::l_set_last_run_mod ( lua_State *  L)
staticprivate

References ModApiBase::getScriptApiBase(), NO_MAP_LOCK_REQUIRED, and ScriptApiBase::setOriginDirect().

+ Here is the call graph for this function:

◆ l_show_formspec()

int ModApiServer::l_show_formspec ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_sound_fade()

int ModApiServer::l_sound_fade ( lua_State *  L)
staticprivate

References Server::fadeSound(), ModApiBase::getServer(), and NO_MAP_LOCK_REQUIRED.

+ Here is the call graph for this function:

◆ l_sound_play()

int ModApiServer::l_sound_play ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, params, Server::playSound(), read_server_sound_params(), and read_soundspec().

+ Here is the call graph for this function:

◆ l_sound_stop()

int ModApiServer::l_sound_stop ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, and Server::stopSound().

+ Here is the call graph for this function:

◆ l_unban_player_or_ip()

int ModApiServer::l_unban_player_or_ip ( lua_State *  L)
staticprivate

References ModApiBase::getServer(), NO_MAP_LOCK_REQUIRED, and Server::unsetIpBanned().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: