diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-08 12:31:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-08 12:31:39 +0300 |
commit | 568cd6279a753b1f04afb08a9193ab0873bf8e53 (patch) | |
tree | 07fe572f9a2a0e11e4e9f10e4529c09b217811bf /src | |
parent | ec10379f79846d794a19baea1e57812e203bc539 (diff) | |
download | manaverse-568cd6279a753b1f04afb08a9193ab0873bf8e53.tar.gz manaverse-568cd6279a753b1f04afb08a9193ab0873bf8e53.tar.bz2 manaverse-568cd6279a753b1f04afb08a9193ab0873bf8e53.tar.xz manaverse-568cd6279a753b1f04afb08a9193ab0873bf8e53.zip |
Add support for /me command in pet talk.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/commands.cpp | 11 |
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; } |