summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-27 16:13:27 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-27 16:13:27 +0300
commit4455f3a3dd5fa28ef7fc1d1cf6d2bff723c90b47 (patch)
tree087515469a7301ea367ae7218dc276f5549caaa9 /src/actions/commands.cpp
parent32ec83a137def94dbea627350f0318c21afbbc09 (diff)
downloadplus-4455f3a3dd5fa28ef7fc1d1cf6d2bff723c90b47.tar.gz
plus-4455f3a3dd5fa28ef7fc1d1cf6d2bff723c90b47.tar.bz2
plus-4455f3a3dd5fa28ef7fc1d1cf6d2bff723c90b47.tar.xz
plus-4455f3a3dd5fa28ef7fc1d1cf6d2bff723c90b47.zip
Move chat command /talkpet into actions.
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index e0514f902..ee04acc65 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -36,6 +36,7 @@
#include "being/playerinfo.h"
#include "being/playerrelations.h"
+#include "gui/chatconsts.h"
#include "gui/dialogsmanager.h"
#include "gui/gui.h"
#include "gui/popupmanager.h"
@@ -663,4 +664,14 @@ impHandler(talkRaw)
return true;
}
+impHandler(talkPet)
+{
+ // in future probably need add channel detection
+ if (!localPlayer->getPets().empty())
+ Net::getChatHandler()->talkPet(event.args, GENERAL_CHANNEL);
+ else
+ Net::getChatHandler()->talk(event.args, GENERAL_CHANNEL);
+ return true;
+}
+
} // namespace Actions