From 568cd6279a753b1f04afb08a9193ab0873bf8e53 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Dec 2014 12:31:39 +0300 Subject: Add support for /me command in pet talk. --- src/actions/commands.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/actions') 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; } -- cgit v1.2.3-70-g09d2