From 3b22410e42be27ac30fc63f020243241d1eea737 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 22 Dec 2017 04:36:26 +0300 Subject: Remove default parameters from chatwindow.h --- src/net/tmwa/chatrecv.cpp | 50 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 12 deletions(-) (limited to 'src/net/tmwa/chatrecv.cpp') diff --git a/src/net/tmwa/chatrecv.cpp b/src/net/tmwa/chatrecv.cpp index 42cac06f4..480527a82 100644 --- a/src/net/tmwa/chatrecv.cpp +++ b/src/net/tmwa/chatrecv.cpp @@ -195,7 +195,11 @@ void ChatRecv::processWhisperContinue(const std::string &nick, if (tradeBot) { if (showMsg && (chatWindow != nullptr)) - chatWindow->addWhisper(nick, chatMsg); + { + chatWindow->addWhisper(nick, + chatMsg, + ChatMsgType::BY_OTHER); + } shopWindow->giveList(nick, ShopWindow::SELL); } } @@ -203,15 +207,23 @@ void ChatRecv::processWhisperContinue(const std::string &nick, { if (tradeBot) { - if (showMsg && (chatWindow != nullptr)) - chatWindow->addWhisper(nick, chatMsg); + if (showMsg && chatWindow != nullptr) + { + chatWindow->addWhisper(nick, + chatMsg, + ChatMsgType::BY_OTHER); + } shopWindow->giveList(nick, ShopWindow::BUY); } } else if (chatMsg.find("!buyitem ") == 0) { - if (showMsg && (chatWindow != nullptr)) - chatWindow->addWhisper(nick, chatMsg); + if (showMsg && chatWindow != nullptr) + { + chatWindow->addWhisper(nick, + chatMsg, + ChatMsgType::BY_OTHER); + } if (tradeBot) { shopWindow->processRequest(nick, chatMsg, @@ -220,8 +232,12 @@ void ChatRecv::processWhisperContinue(const std::string &nick, } else if (chatMsg.find("!sellitem ") == 0) { - if (showMsg && (chatWindow != nullptr)) - chatWindow->addWhisper(nick, chatMsg); + if (showMsg && chatWindow != nullptr) + { + chatWindow->addWhisper(nick, + chatMsg, + ChatMsgType::BY_OTHER); + } if (tradeBot) { shopWindow->processRequest(nick, chatMsg, @@ -232,19 +248,27 @@ void ChatRecv::processWhisperContinue(const std::string &nick, && chatMsg.find("\302\202") == 0) { chatMsg = chatMsg.erase(0, 2); - if (showMsg && (chatWindow != nullptr)) - chatWindow->addWhisper(nick, chatMsg); + if (showMsg && chatWindow != nullptr) + { + chatWindow->addWhisper(nick, + chatMsg, + ChatMsgType::BY_OTHER); + } if (chatMsg.find("B1") == 0 || chatMsg.find("S1") == 0) ShopWindow::showList(nick, chatMsg); } else if (chatWindow != nullptr) { - chatWindow->addWhisper(nick, chatMsg); + chatWindow->addWhisper(nick, + chatMsg, + ChatMsgType::BY_OTHER); } } else if (chatWindow != nullptr) { - chatWindow->addWhisper(nick, chatMsg); + chatWindow->addWhisper(nick, + chatMsg, + ChatMsgType::BY_OTHER); } } else @@ -254,7 +278,9 @@ void ChatRecv::processWhisperContinue(const std::string &nick, (chatMsg.find("!selllist") != 0 && chatMsg.find("!buylist") != 0))) { - chatWindow->addWhisper(nick, chatMsg); + chatWindow->addWhisper(nick, + chatMsg, + ChatMsgType::BY_OTHER); } } } -- cgit v1.2.3-70-g09d2