From a5199d9d9af28d7a2b5472b02c72445c25a5a3f9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 9 Sep 2014 12:43:54 +0300 Subject: Move AdminHandler::warp from ea namespace into eathena and tmwa. --- src/net/tmwa/adminhandler.cpp | 11 +++++++++++ src/net/tmwa/adminhandler.h | 3 +++ 2 files changed, 14 insertions(+) (limited to 'src/net/tmwa') diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp index 6cb0601f4..a890ea5fc 100644 --- a/src/net/tmwa/adminhandler.cpp +++ b/src/net/tmwa/adminhandler.cpp @@ -24,6 +24,11 @@ #include "notifymanager.h" +#include "gui/chatconsts.h" + +#include "net/chathandler.h" +#include "net/net.h" + #include "net/tmwa/messageout.h" #include "net/tmwa/protocol.h" @@ -94,4 +99,10 @@ void AdminHandler::kick(const int playerId) const outMsg.writeInt32(playerId, "account id"); } +void AdminHandler::warp(const std::string &map, const int x, const int y) const +{ + Net::getChatHandler()->talk(strprintf( + "@warp %s %d %d", map.c_str(), x, y), GENERAL_CHANNEL); +} + } // namespace TmwAthena diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h index ad3475a44..c511ebd01 100644 --- a/src/net/tmwa/adminhandler.h +++ b/src/net/tmwa/adminhandler.h @@ -46,6 +46,9 @@ class AdminHandler final : public MessageHandler, public Ea::AdminHandler void hide(const bool h) const override final; void kick(const int playerId) const override final; + + void warp(const std::string &map, + const int x, const int y) const override final; }; } // namespace TmwAthena -- cgit v1.2.3-70-g09d2