From 8356efd659046630db247b344bb4baec29c4a6e7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 4 Sep 2015 01:26:47 +0300 Subject: Remove some useless includes. --- src/net/tmwa/chatrecv.cpp | 53 +---------------------------------------------- 1 file changed, 1 insertion(+), 52 deletions(-) (limited to 'src/net/tmwa/chatrecv.cpp') diff --git a/src/net/tmwa/chatrecv.cpp b/src/net/tmwa/chatrecv.cpp index 561511041..a768dab2e 100644 --- a/src/net/tmwa/chatrecv.cpp +++ b/src/net/tmwa/chatrecv.cpp @@ -43,7 +43,6 @@ #include "net/messagein.h" #include "net/tmwa/guildmanager.h" -#include "net/tmwa/protocol.h" #include "debug.h" @@ -123,7 +122,6 @@ void ChatRecv::processChatContinue(std::string chatMsg, void ChatRecv::processGmChat(Net::MessageIn &msg) { BLOCK_START("ChatRecv::processChat") - const bool normalChat = msg.getId() == SMSG_PLAYER_CHAT; int chatMsgLength = msg.readInt16("len") - 4; if (chatMsgLength <= 0) { @@ -132,57 +130,8 @@ void ChatRecv::processGmChat(Net::MessageIn &msg) } std::string chatMsg = msg.readRawString(chatMsgLength, "message"); - const size_t pos = chatMsg.find(" : ", 0); - - if (normalChat) - { - bool allow(true); - if (chatWindow) - { - allow = chatWindow->resortChatLog(chatMsg, - ChatMsgType::BY_PLAYER, - GENERAL_CHANNEL, - IgnoreRecord_false, - TryRemoveColors_true); - } - - const std::string senseStr("You sense the following: "); - if (actorManager && !chatMsg.find(senseStr)) - { - actorManager->parseLevels( - chatMsg.substr(senseStr.size())); - } - if (pos == std::string::npos && - !Ea::ChatRecv::mShowMotd && - Ea::ChatRecv::mSkipping) - { - // skip motd from "new" tmw server - if (Ea::ChatRecv::mMotdTime == -1) - { - Ea::ChatRecv::mMotdTime = cur_time + 1; - } - else if (Ea::ChatRecv::mMotdTime == cur_time || - Ea::ChatRecv::mMotdTime < cur_time) - { - Ea::ChatRecv::mSkipping = false; - } - BLOCK_END("ChatRecv::processChat") - return; - } - - if (pos != std::string::npos) - chatMsg.erase(0, pos + 3); - - trim(chatMsg); - - if (localPlayer) - { - if ((chatWindow || Ea::ChatRecv::mShowMotd) && allow) - localPlayer->setSpeech(chatMsg, GENERAL_CHANNEL); - } - } - else if (localChatTab) + if (localChatTab) { if (chatWindow) chatWindow->addGlobalMessage(chatMsg); -- cgit v1.2.3-60-g2f50