summaryrefslogtreecommitdiff
path: root/src/net/tmwa/adminhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-25 17:43:16 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-25 17:48:01 +0300
commitc1c666d37d924f4ef9c544b7ce25fc3ef7b6dd15 (patch)
treebf2b183127384c9b0b77719c1176db51f917f6f4 /src/net/tmwa/adminhandler.cpp
parentf2a2fe38f1185cbe6acb978b37190aaae76f1b62 (diff)
downloadmv-c1c666d37d924f4ef9c544b7ce25fc3ef7b6dd15.tar.gz
mv-c1c666d37d924f4ef9c544b7ce25fc3ef7b6dd15.tar.bz2
mv-c1c666d37d924f4ef9c544b7ce25fc3ef7b6dd15.tar.xz
mv-c1c666d37d924f4ef9c544b7ce25fc3ef7b6dd15.zip
Replace direct gm commands to gm command functions.
Diffstat (limited to 'src/net/tmwa/adminhandler.cpp')
-rw-r--r--src/net/tmwa/adminhandler.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp
index f9180a7d8..264eca1ad 100644
--- a/src/net/tmwa/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -22,13 +22,10 @@
#include "net/tmwa/adminhandler.h"
-#include "const/gui/chat.h"
-
-#include "net/chathandler.h"
-
#include "net/tmwa/messageout.h"
#include "net/tmwa/protocolout.h"
+#include "utils/gmfunctions.h"
#include "utils/stringutils.h"
#include "debug.h"
@@ -76,8 +73,8 @@ void AdminHandler::kickAll() const
void AdminHandler::warp(const std::string &map, const int x, const int y) const
{
- chatHandler->talk(strprintf(
- "@warp %s %d %d", map.c_str(), x, y), GENERAL_CHANNEL);
+ Gm::runCommand("warp",
+ strprintf("%s %d %d", map.c_str(), x, y));
}
void AdminHandler::resetStats() const
@@ -90,12 +87,12 @@ void AdminHandler::resetSkills() const
void AdminHandler::gotoName(const std::string &name) const
{
- chatHandler->talk("@goto " + name, GENERAL_CHANNEL);
+ Gm::runCommand("goto", name);
}
void AdminHandler::recallName(const std::string &name) const
{
- chatHandler->talk("@recall " + name, GENERAL_CHANNEL);
+ Gm::runCommand("recall", name);
}
void AdminHandler::mute(const Being *const being A_UNUSED,