Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
l_server.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5#pragma once
6
7#include "lua_api/l_base.h"
8
9class ModApiServer : public ModApiBase
10{
11private:
12 // request_shutdown([message], [reconnect])
13 static int l_request_shutdown(lua_State *L);
14
15 // get_server_status()
16 static int l_get_server_status(lua_State *L);
17
18 // get_server_uptime()
19 static int l_get_server_uptime(lua_State *L);
20
21 // get_server_max_lag()
22 static int l_get_server_max_lag(lua_State *L);
23
24 // get_worldpath()
25 static int l_get_worldpath(lua_State *L);
26
27 // get_mod_data_path()
28 static int l_get_mod_data_path(lua_State *L);
29
30 // is_singleplayer()
31 static int l_is_singleplayer(lua_State *L);
32
33 // get_current_modname()
34 static int l_get_current_modname(lua_State *L);
35
36 // get_modpath(modname)
37 static int l_get_modpath(lua_State *L);
38
39 // get_modnames()
40 // the returned list is sorted alphabetically for you
41 static int l_get_modnames(lua_State *L);
42
43 // get_game_info()
44 static int l_get_game_info(lua_State *L);
45
46 // print(text)
47 static int l_print(lua_State *L);
48
49 // chat_send_all(text)
50 static int l_chat_send_all(lua_State *L);
51
52 // chat_send_player(name, text)
53 static int l_chat_send_player(lua_State *L);
54
55 // show_formspec(playername,formname,formspec)
56 static int l_show_formspec(lua_State *L);
57
58 // sound_play(spec, parameters)
59 static int l_sound_play(lua_State *L);
60
61 // sound_stop(handle)
62 static int l_sound_stop(lua_State *L);
63
64 // sound_fade(handle, step, gain)
65 static int l_sound_fade(lua_State *L);
66
67 // dynamic_add_media(filepath)
68 static int l_dynamic_add_media(lua_State *L);
69
70 // get_player_privs(name, text)
71 static int l_get_player_privs(lua_State *L);
72
73 // get_player_ip()
74 static int l_get_player_ip(lua_State *L);
75
76 // get_player_information(name)
77 static int l_get_player_information(lua_State *L);
78
79 // get_player_window_information(name)
80 static int l_get_player_window_information(lua_State *L);
81
82 // get_ban_list()
83 static int l_get_ban_list(lua_State *L);
84
85 // get_ban_description()
86 static int l_get_ban_description(lua_State *L);
87
88 // ban_player()
89 static int l_ban_player(lua_State *L);
90
91 // unban_player_or_ip()
92 static int l_unban_player_or_ip(lua_State *L);
93
94 // disconnect_player(name[, reason[, reconnect]]) -> success
95 static int l_disconnect_player(lua_State *L);
96
97 // remove_player(name)
98 static int l_remove_player(lua_State *L);
99
100 // notify_authentication_modified(name)
101 static int l_notify_authentication_modified(lua_State *L);
102
103 // do_async_callback(func, params, mod_origin)
104 static int l_do_async_callback(lua_State *L);
105
106 // register_async_dofile(path)
107 static int l_register_async_dofile(lua_State *L);
108
109 // register_mapgen_script(path)
110 static int l_register_mapgen_script(lua_State *L);
111
112 // serialize_roundtrip(obj)
113 static int l_serialize_roundtrip(lua_State *L);
114
115public:
116 static void Initialize(lua_State *L, int top);
117 static void InitializeAsync(lua_State *L, int top);
118};
Definition l_base.h:28
Definition l_server.h:10
static int l_get_server_uptime(lua_State *L)
Definition l_server.cpp:40
static int l_is_singleplayer(lua_State *L)
Definition l_server.cpp:609
static int l_dynamic_add_media(lua_State *L)
Definition l_server.cpp:548
static int l_notify_authentication_modified(lua_State *L)
Definition l_server.cpp:618
static int l_get_worldpath(lua_State *L)
Definition l_server.cpp:484
static int l_chat_send_all(lua_State *L)
Definition l_server.cpp:67
static int l_show_formspec(lua_State *L)
Definition l_server.cpp:411
static int l_get_current_modname(lua_State *L)
Definition l_server.cpp:422
static int l_get_game_info(lua_State *L)
Definition l_server.cpp:470
static int l_sound_play(lua_State *L)
Definition l_server.cpp:511
static int l_sound_fade(lua_State *L)
Definition l_server.cpp:537
static int l_get_player_privs(lua_State *L)
Definition l_server.cpp:106
static int l_get_player_ip(lua_State *L)
Definition l_server.cpp:125
static int l_sound_stop(lua_State *L)
Definition l_server.cpp:529
static int l_get_player_information(lua_State *L)
Definition l_server.cpp:143
static int l_print(lua_State *L)
Definition l_server.cpp:57
static int l_serialize_roundtrip(lua_State *L)
Definition l_server.cpp:691
static void Initialize(lua_State *L, int top)
Definition l_server.cpp:713
static int l_remove_player(lua_State *L)
Definition l_server.cpp:383
static int l_unban_player_or_ip(lua_State *L)
Definition l_server.cpp:401
static int l_get_server_status(lua_State *L)
Definition l_server.cpp:32
static int l_request_shutdown(lua_State *L)
Definition l_server.cpp:21
static void InitializeAsync(lua_State *L, int top)
Definition l_server.cpp:757
static int l_get_ban_description(lua_State *L)
Definition l_server.cpp:323
static int l_get_player_window_information(lua_State *L)
Definition l_server.cpp:272
static int l_get_ban_list(lua_State *L)
Definition l_server.cpp:315
static int l_ban_player(lua_State *L)
Definition l_server.cpp:332
static int l_get_modpath(lua_State *L)
Definition l_server.cpp:434
static int l_disconnect_player(lua_State *L)
Definition l_server.cpp:354
static int l_register_async_dofile(lua_State *L)
Definition l_server.cpp:656
static int l_get_modnames(lua_State *L)
Definition l_server.cpp:448
static int l_chat_send_player(lua_State *L)
Definition l_server.cpp:86
static int l_get_server_max_lag(lua_State *L)
Definition l_server.cpp:48
static int l_do_async_callback(lua_State *L)
Definition l_server.cpp:629
static int l_register_mapgen_script(lua_State *L)
Definition l_server.cpp:673
static int l_get_mod_data_path(lua_State *L)
Definition l_server.cpp:493