aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_client.h11
-rw-r--r--src/script/lua_api/l_server.cpp19
-rw-r--r--src/script/lua_api/l_server.h3
3 files changed, 6 insertions, 27 deletions
diff --git a/src/script/lua_api/l_client.h b/src/script/lua_api/l_client.h
index ebce7c02a..4e49ad60e 100644
--- a/src/script/lua_api/l_client.h
+++ b/src/script/lua_api/l_client.h
@@ -104,24 +104,25 @@ private:
// get_csm_restrictions()
static int l_get_csm_restrictions(lua_State *L);
-
+
// send_damage(damage)
static int l_send_damage(lua_State *L);
-
+
// place_node(pos)
static int l_place_node(lua_State *L);
-
+
// dig_node(pos)
static int l_dig_node(lua_State *L);
-
+
// get_inventory(location)
static int l_get_inventory(lua_State *L);
-
+
// set_keypress(key_setting, pressed)
static int l_set_keypress(lua_State *L);
// drop_selected_item()
static int l_drop_selected_item(lua_State *L);
+
public:
static void Initialize(lua_State *L, int top);
};
diff --git a/src/script/lua_api/l_server.cpp b/src/script/lua_api/l_server.cpp
index befbfb936..64ae924d2 100644
--- a/src/script/lua_api/l_server.cpp
+++ b/src/script/lua_api/l_server.cpp
@@ -338,23 +338,6 @@ int ModApiServer::l_kick_player(lua_State *L)
return 1;
}
-// redirect_player(name, address, port)
-int ModApiServer::l_redirect_player(lua_State *L)
-{
- NO_MAP_LOCK_REQUIRED;
- const char *name = luaL_checkstring(L, 1);
- const char *address = luaL_checkstring(L, 2);
- u16 port = luaL_checknumber(L, 3);
- RemotePlayer *player = dynamic_cast<ServerEnvironment *>(getEnv(L))->getPlayer(name);
- if (player == NULL) {
- lua_pushboolean(L, false); // No such player
- return 1;
- }
- getServer(L)->RedirectPeer(player->getPeerId(), address, port);
- lua_pushboolean(L, true);
- return 1;
-}
-
// remove_player(name)
int ModApiServer::l_remove_player(lua_State *L)
{
@@ -580,8 +563,6 @@ void ModApiServer::Initialize(lua_State *L, int top)
API_FCT(get_ban_description);
API_FCT(ban_player);
API_FCT(kick_player);
- API_FCT(redirect_player);
- API_FCT(remove_player);
API_FCT(unban_player_or_ip);
API_FCT(notify_authentication_modified);
diff --git a/src/script/lua_api/l_server.h b/src/script/lua_api/l_server.h
index 3b590af9d..938bfa8ef 100644
--- a/src/script/lua_api/l_server.h
+++ b/src/script/lua_api/l_server.h
@@ -96,9 +96,6 @@ private:
// kick_player(name, [message]) -> success
static int l_kick_player(lua_State *L);
-
- // redirect_player(name, address, port) -> success
- static int l_redirect_player(lua_State *L);
// remove_player(name)
static int l_remove_player(lua_State *L);