retrieve more client info on minetest 5.X or 5.2 for minetest5

* take from https://forum.minetest.net/viewtopic.php?p=354631#p354631
* usefull for give more info for idetification of clients cheaters
This commit is contained in:
mckaygerhard 2021-11-21 19:54:55 -04:00
parent f65bba2e5c
commit 822ab80f30
2 changed files with 7 additions and 10 deletions

View File

@ -4073,14 +4073,13 @@ Utilities
connection_uptime = 200, -- seconds since client connected
protocol_version = 32, -- protocol version used by client
formspec_version = 2, -- supported formspec version
-- following information is available on debug build only!!!
-- DO NOT USE IN MODS
--ser_vers = 26, -- serialization version used by client
--major = 0, -- major version number
--minor = 4, -- minor version number
--patch = 10, -- patch version number
--vers_string = "0.4.9-git", -- full version string
--state = "Active" -- current client state
-- following information is available on minenux only build. dont assume in mods
serialization_version = 26, -- serialization version used by client
major = 5, -- major version number
minor = 2, -- minor version number
patch = 1, -- patch version number
vers_string = "5.2.1", -- full version string
state = "Active" -- current client state
}
* `minetest.mkdir(path)`: returns success.

View File

@ -237,7 +237,6 @@ int ModApiServer::l_get_player_information(lua_State *L)
lua_pushnumber(L, player->formspec_version);
lua_settable(L, table);
#ifndef NDEBUG
lua_pushstring(L,"serialization_version");
lua_pushnumber(L, ser_vers);
lua_settable(L, table);
@ -261,7 +260,6 @@ int ModApiServer::l_get_player_information(lua_State *L)
lua_pushstring(L,"state");
lua_pushstring(L,ClientInterface::state2Name(state).c_str());
lua_settable(L, table);
#endif
#undef ERET
return 1;