From 84ac743d734152d06b105543cbc963d973420e71 Mon Sep 17 00:00:00 2001 From: James R Date: Sun, 12 Jan 2020 20:04:05 -0800 Subject: [PATCH] Kill Lua adminplayer --- src/lua_script.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/lua_script.c b/src/lua_script.c index eb1afaf09..2538fb711 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -274,12 +274,6 @@ int LUA_PushGlobals(lua_State *L, const char *word) return 0; LUA_PushUserdata(L, &players[serverplayer], META_PLAYER); return 1; - } else if (fastcmp(word,"admin")) { // BACKWARDS COMPATIBILITY HACK: This was replaced with IsPlayerAdmin(), but some 2.1 Lua scripts still use the admin variable. It now points to the first admin player in the array. - LUA_Deprecated(L, "admin", "IsPlayerAdmin(player)"); - if (!playeringame[adminplayers[0]] || IsPlayerAdmin(serverplayer)) - return 0; - LUA_PushUserdata(L, &players[adminplayers[0]], META_PLAYER); - return 1; } else if (fastcmp(word,"emeralds")) { lua_pushinteger(L, emeralds); return 1;