diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-16 23:48:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-16 23:48:24 +0300 |
commit | 2cdd26078b672c19ba4f440df20a59082b00a1f6 (patch) | |
tree | dc3c53303e299f04ead3e473f9c71be229faa902 /src/net/eathena | |
parent | 0561612345f979a3c59ed4feeeddf6491974905a (diff) | |
download | manaplus-2cdd26078b672c19ba4f440df20a59082b00a1f6.tar.gz manaplus-2cdd26078b672c19ba4f440df20a59082b00a1f6.tar.bz2 manaplus-2cdd26078b672c19ba4f440df20a59082b00a1f6.tar.xz manaplus-2cdd26078b672c19ba4f440df20a59082b00a1f6.zip |
Move talkPet from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/chathandler.cpp | 8 | ||||
-rw-r--r-- | src/net/eathena/chathandler.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 41fc78f3b..d83daac27 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -745,4 +745,12 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg) BLOCK_END("ChatHandler::processBeingChat") } +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); +} + } // namespace EAthena diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h index 095a545d6..3bda55400 100644 --- a/src/net/eathena/chathandler.h +++ b/src/net/eathena/chathandler.h @@ -84,6 +84,9 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler void partChannel(const std::string &channel) override final; + void talkPet(const std::string &restrict text, + const std::string &restrict channel) const override final; + protected: static std::string extractChannelFromMessage(std::string &chatMsg); |