diff options
author | sfan5 <sfan5@live.de> | 2021-08-28 12:15:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-28 12:15:12 +0200 |
commit | 6a1424f2b18520f40ba8cfd12f7988f6b33db9a6 (patch) | |
tree | 081e49b5f47693cddae8ba6c921cb6c3041b7731 /src/script/lua_api/l_server.cpp | |
parent | 0f8a6d78a72731833664b09695bd44471bc014ac (diff) | |
download | minetest-6a1424f2b18520f40ba8cfd12f7988f6b33db9a6.tar.gz minetest-6a1424f2b18520f40ba8cfd12f7988f6b33db9a6.tar.bz2 minetest-6a1424f2b18520f40ba8cfd12f7988f6b33db9a6.zip |
Async-related script cleanups
Diffstat (limited to 'src/script/lua_api/l_server.cpp')
-rw-r--r-- | src/script/lua_api/l_server.cpp | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/src/script/lua_api/l_server.cpp b/src/script/lua_api/l_server.cpp index bf5292521..9866e0bc8 100644 --- a/src/script/lua_api/l_server.cpp +++ b/src/script/lua_api/l_server.cpp @@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "common/c_content.h" #include "cpp_api/s_base.h" #include "cpp_api/s_security.h" +#include "scripting_server.h" #include "server.h" #include "environment.h" #include "remoteplayer.h" @@ -498,31 +499,6 @@ int ModApiServer::l_notify_authentication_modified(lua_State *L) return 0; } -// get_last_run_mod() -int ModApiServer::l_get_last_run_mod(lua_State *L) -{ - NO_MAP_LOCK_REQUIRED; - lua_rawgeti(L, LUA_REGISTRYINDEX, CUSTOM_RIDX_CURRENT_MOD_NAME); - std::string current_mod = readParam<std::string>(L, -1, ""); - if (current_mod.empty()) { - lua_pop(L, 1); - lua_pushstring(L, getScriptApiBase(L)->getOrigin().c_str()); - } - return 1; -} - -// set_last_run_mod(modname) -int ModApiServer::l_set_last_run_mod(lua_State *L) -{ - NO_MAP_LOCK_REQUIRED; -#ifdef SCRIPTAPI_DEBUG - const char *mod = lua_tostring(L, 1); - getScriptApiBase(L)->setOriginDirect(mod); - //printf(">>>> last mod set from Lua: %s\n", mod); -#endif - return 0; -} - void ModApiServer::Initialize(lua_State *L, int top) { API_FCT(request_shutdown); @@ -555,7 +531,4 @@ void ModApiServer::Initialize(lua_State *L, int top) API_FCT(remove_player); API_FCT(unban_player_or_ip); API_FCT(notify_authentication_modified); - - API_FCT(get_last_run_mod); - API_FCT(set_last_run_mod); } |