]> git.lizzy.rs Git - dragonfireclient.git/blob - src/script/lua_api/l_server.h
Sound: Add pitch option (#5960)
[dragonfireclient.git] / src / script / lua_api / l_server.h
1 /*
2 Minetest
3 Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef L_SERVER_H_
21 #define L_SERVER_H_
22
23 #include "lua_api/l_base.h"
24
25 class ModApiServer : public ModApiBase
26 {
27 private:
28         // request_shutdown([message], [reconnect])
29         static int l_request_shutdown(lua_State *L);
30
31         // get_server_status()
32         static int l_get_server_status(lua_State *L);
33
34         // get_server_uptime()
35         static int l_get_server_uptime(lua_State *L);
36
37         // get_worldpath()
38         static int l_get_worldpath(lua_State *L);
39
40         // is_singleplayer()
41         static int l_is_singleplayer(lua_State *L);
42
43         // get_current_modname()
44         static int l_get_current_modname(lua_State *L);
45
46         // get_modpath(modname)
47         static int l_get_modpath(lua_State *L);
48
49         // get_modnames()
50         // the returned list is sorted alphabetically for you
51         static int l_get_modnames(lua_State *L);
52
53         // print(text)
54         static int l_print(lua_State *L);
55
56         // chat_send_all(text)
57         static int l_chat_send_all(lua_State *L);
58
59         // chat_send_player(name, text)
60         static int l_chat_send_player(lua_State *L);
61
62         // show_formspec(playername,formname,formspec)
63         static int l_show_formspec(lua_State *L);
64
65         // sound_play(spec, parameters)
66         static int l_sound_play(lua_State *L);
67
68         // sound_stop(handle)
69         static int l_sound_stop(lua_State *L);
70
71         // sound_fade(handle, step, gain)
72         static int l_sound_fade(lua_State *L);
73
74         // get_player_privs(name, text)
75         static int l_get_player_privs(lua_State *L);
76
77         // get_player_ip()
78         static int l_get_player_ip(lua_State *L);
79
80         // get_player_information(name)
81         static int l_get_player_information(lua_State *L);
82
83         // get_ban_list()
84         static int l_get_ban_list(lua_State *L);
85
86         // get_ban_description()
87         static int l_get_ban_description(lua_State *L);
88
89         // ban_player()
90         static int l_ban_player(lua_State *L);
91
92         // unban_player_or_ip()
93         static int l_unban_player_or_ip(lua_State *L);
94
95         // kick_player(name, [message]) -> success
96         static int l_kick_player(lua_State *L);
97
98         // remove_player(name)
99         static int l_remove_player(lua_State *L);
100
101         // notify_authentication_modified(name)
102         static int l_notify_authentication_modified(lua_State *L);
103
104         // get_last_run_mod()
105         static int l_get_last_run_mod(lua_State *L);
106
107         // set_last_run_mod(modname)
108         static int l_set_last_run_mod(lua_State *L);
109
110 public:
111         static void Initialize(lua_State *L, int top);
112 };
113
114 #endif /* L_SERVER_H_ */