From b753348ab7153282e6cf539c627dfd1fb9896c42 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 16 Nov 2015 18:40:43 +0300 Subject: Add slide function in adminhandler. --- src/net/ea/adminhandler.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/net/ea/adminhandler.cpp') diff --git a/src/net/ea/adminhandler.cpp b/src/net/ea/adminhandler.cpp index 6815164c4..bccd2062d 100644 --- a/src/net/ea/adminhandler.cpp +++ b/src/net/ea/adminhandler.cpp @@ -22,9 +22,12 @@ #include "net/ea/adminhandler.h" +#include "game.h" + #include "gui/chatconsts.h" #include "net/chathandler.h" +#include "net/serverfeatures.h" #include "utils/stringutils.h" @@ -76,4 +79,17 @@ void AdminHandler::createItems(const int id, GENERAL_CHANNEL); } +void AdminHandler::slide(const int x, const int y) const +{ + if (serverFeatures->haveSlide()) + { + chatHandler->talk(strprintf("@slide %d %d", x, y), + GENERAL_CHANNEL); + } + else + { + warp(Game::instance()->getCurrentMapName(), x, y); + } +} + } // namespace Ea -- cgit v1.2.3-70-g09d2