From 0381a0de69cc21c8886fb0a68cda450d3135d55a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 14 Jan 2015 17:27:52 +0300 Subject: For trade tab use channel to send messages. --- src/net/eathena/chathandler.cpp | 5 ++++- src/net/tmwa/chathandler.cpp | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src/net') diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 3def53afd..456bda0e5 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -194,7 +194,10 @@ void ChatHandler::privateMessage(const std::string &restrict recipient, void ChatHandler::channelMessage(const std::string &restrict channel, const std::string &restrict text) { - privateMessage(channel, text); + if (channel == TRADE_CHANNEL) + talk("\302\202" + text, GENERAL_CHANNEL); + else + privateMessage(channel, text); } void ChatHandler::who() const diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp index dafa31cf5..a48aa5426 100644 --- a/src/net/tmwa/chathandler.cpp +++ b/src/net/tmwa/chathandler.cpp @@ -26,6 +26,8 @@ #include "being/localplayer.h" +#include "gui/chatconsts.h" + #include "gui/widgets/tabs/chat/chattab.h" #include "gui/windows/chatwindow.h" @@ -163,9 +165,11 @@ void ChatHandler::privateMessage(const std::string &restrict recipient, mSentWhispers.push(recipient); } -void ChatHandler::channelMessage(const std::string &restrict channel A_UNUSED, - const std::string &restrict text A_UNUSED) +void ChatHandler::channelMessage(const std::string &restrict channel, + const std::string &restrict text) { + if (channel == TRADE_CHANNEL) + talk("\302\202" + text, GENERAL_CHANNEL); } void ChatHandler::who() const -- cgit v1.2.3-60-g2f50