summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-25 22:29:29 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-25 22:29:29 +0300
commit3a091245572872f5cda79eab92eb392f92c02b39 (patch)
tree512e1b815194d865f67714542ab076411e084f32 /src/actions/commands.cpp
parent10029599ee4cb4c26531303ab0e07cedc856f1ad (diff)
downloadplus-3a091245572872f5cda79eab92eb392f92c02b39.tar.gz
plus-3a091245572872f5cda79eab92eb392f92c02b39.tar.bz2
plus-3a091245572872f5cda79eab92eb392f92c02b39.tar.xz
plus-3a091245572872f5cda79eab92eb392f92c02b39.zip
Move chat command /move into actions.
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 797c75edb..712850a9f 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -72,6 +72,7 @@
#include "net/net.h"
#include "utils/gettext.h"
+#include "utils/stringutils.h"
#include "debug.h"
@@ -272,4 +273,17 @@ impHandler0(printAll)
return false;
}
+impHandler(move)
+{
+ int x = 0;
+ int y = 0;
+
+ if (localPlayer && parse2Int(event.args, x, y))
+ {
+ localPlayer->setDestination(x, y);
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions