mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow scripts to get the client protocol version in non-debug builds. (#5649)
This commit is contained in:
parent
d130e1fdc0
commit
1ef9eee311
3 changed files with 7 additions and 7 deletions
|
@ -137,7 +137,7 @@ int ModApiServer::l_get_player_ip(lua_State *L)
|
|||
}
|
||||
}
|
||||
|
||||
// get_player_information()
|
||||
// get_player_information(name)
|
||||
int ModApiServer::l_get_player_information(lua_State *L)
|
||||
{
|
||||
|
||||
|
@ -231,15 +231,15 @@ int ModApiServer::l_get_player_information(lua_State *L)
|
|||
lua_pushnumber(L, uptime);
|
||||
lua_settable(L, table);
|
||||
|
||||
lua_pushstring(L,"protocol_version");
|
||||
lua_pushnumber(L, prot_vers);
|
||||
lua_settable(L, table);
|
||||
|
||||
#ifndef NDEBUG
|
||||
lua_pushstring(L,"serialization_version");
|
||||
lua_pushnumber(L, ser_vers);
|
||||
lua_settable(L, table);
|
||||
|
||||
lua_pushstring(L,"protocol_version");
|
||||
lua_pushnumber(L, prot_vers);
|
||||
lua_settable(L, table);
|
||||
|
||||
lua_pushstring(L,"major");
|
||||
lua_pushnumber(L, major);
|
||||
lua_settable(L, table);
|
||||
|
|
|
@ -74,7 +74,7 @@ private:
|
|||
// get_player_ip()
|
||||
static int l_get_player_ip(lua_State *L);
|
||||
|
||||
// get_player_information()
|
||||
// get_player_information(name)
|
||||
static int l_get_player_information(lua_State *L);
|
||||
|
||||
// get_ban_list()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue