summaryrefslogtreecommitdiff
path: root/src/actions/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-08 12:31:39 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-08 12:31:39 +0300
commit568cd6279a753b1f04afb08a9193ab0873bf8e53 (patch)
tree07fe572f9a2a0e11e4e9f10e4529c09b217811bf /src/actions/commands.cpp
parentec10379f79846d794a19baea1e57812e203bc539 (diff)
downloadplus-568cd6279a753b1f04afb08a9193ab0873bf8e53.tar.gz
plus-568cd6279a753b1f04afb08a9193ab0873bf8e53.tar.bz2
plus-568cd6279a753b1f04afb08a9193ab0873bf8e53.tar.xz
plus-568cd6279a753b1f04afb08a9193ab0873bf8e53.zip
Add support for /me command in pet talk.
Diffstat (limited to 'src/actions/commands.cpp')
-rw-r--r--src/actions/commands.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index d3c79c10f..c8d4f2b21 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -624,11 +624,18 @@ impHandler(talkRaw)
impHandler(talkPet)
{
+ std::string args = event.args;
// in future probably need add channel detection
if (!localPlayer->getPets().empty())
- chatHandler->talkPet(event.args, GENERAL_CHANNEL);
+ {
+ if (findCutFirst(args, "/me "))
+ args = textToMe(args);
+ chatHandler->talkPet(args, GENERAL_CHANNEL);
+ }
else
- chatHandler->talk(event.args, GENERAL_CHANNEL);
+ {
+ chatHandler->talk(args, GENERAL_CHANNEL);
+ }
return true;
}