summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-27 17:56:43 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-27 17:56:43 +0300
commiteee2f72b047262cbb6478c67f2e5293a85ce79e4 (patch)
treea5924ee55bd5570825dccd0a344dd9f986157e12 /src/net/ea
parente068a57abf67381e4f58f90e40af3be6b386e240 (diff)
downloadmv-eee2f72b047262cbb6478c67f2e5293a85ce79e4.tar.gz
mv-eee2f72b047262cbb6478c67f2e5293a85ce79e4.tar.bz2
mv-eee2f72b047262cbb6478c67f2e5293a85ce79e4.tar.xz
mv-eee2f72b047262cbb6478c67f2e5293a85ce79e4.zip
allow to owner talk from own pet.
New chat command: /talkpet text
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/chathandler.cpp8
-rw-r--r--src/net/ea/chathandler.h3
2 files changed, 11 insertions, 0 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 698a03ef4..2bfee7ad2 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -70,6 +70,14 @@ void ChatHandler::me(const std::string &restrict text,
talk(action, channel);
}
+void ChatHandler::talkPet(const std::string &restrict text,
+ const std::string &restrict channel) const
+{
+ // here need string duplication
+ std::string action = strprintf("\302\202\303 %s", text.c_str());
+ talk(action, channel);
+}
+
void ChatHandler::processWhisperResponse(Net::MessageIn &msg)
{
BLOCK_START("ChatHandler::processWhisperResponse")
diff --git a/src/net/ea/chathandler.h b/src/net/ea/chathandler.h
index cba709577..b2e38fede 100644
--- a/src/net/ea/chathandler.h
+++ b/src/net/ea/chathandler.h
@@ -38,6 +38,9 @@ class ChatHandler : public Net::ChatHandler
A_DELETE_COPY(ChatHandler)
+ void talkPet(const std::string &restrict text,
+ const std::string &restrict channel) const override final;
+
void me(const std::string &restrict text,
const std::string &restrict channel) const override final;