From 4cee9a86ac6fcde65dc2855a716b52f4437323f0 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Fri, 30 Mar 2012 20:54:57 +0300 Subject: Improved teleport command --- src/servercommand.cpp | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'src') diff --git a/src/servercommand.cpp b/src/servercommand.cpp index 64c43d4f5..f6088925e 100644 --- a/src/servercommand.cpp +++ b/src/servercommand.cpp @@ -103,50 +103,6 @@ void cmd_setting(std::wostringstream &os, os<< L"-!- Setting changed and configuration saved."; } -void cmd_teleport(std::wostringstream &os, - ServerCommandContext *ctx) -{ - if(!ctx->server->checkPriv(ctx->player->getName(), "teleport")) - { - os<parms.size() != 2) - { - os< coords = str_split(ctx->parms[1], L','); - if(coords.size() != 3) - { - os<player->getName()<<" teleports from " - <player->getPosition()/BS)<<" to " - <player->getPlayerSAO(); - if(sao) - { - sao->setPos(dest); - os<< L"-!- Teleported."; - } - else - { - errorstream<<"Teleport failed, player object not found!" - <server->checkPriv(ctx->player->getName(), "ban")) @@ -240,8 +196,6 @@ std::wstring processServerCommand(ServerCommandContext *ctx) cmd_shutdown(os, ctx); else if(ctx->parms[0] == L"setting") cmd_setting(os, ctx); - else if(ctx->parms[0] == L"teleport") - cmd_teleport(os, ctx); else if(ctx->parms[0] == L"ban" || ctx->parms[0] == L"unban") cmd_banunban(os, ctx); else if(ctx->parms[0] == L"me") -- cgit v1.2.3