summaryrefslogtreecommitdiff
path: root/src/net/tmwa/chatrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-16 02:19:08 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-16 02:19:08 +0300
commit19b82b4dad9b66418a4e7d0ed0ba23d0cab17216 (patch)
tree0f82530b8e11d70923e96d5ba17107f92921365f /src/net/tmwa/chatrecv.cpp
parentb49d05166ac67ed0ef189b1e3859573108843db1 (diff)
downloadmanaverse-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.tar.gz
manaverse-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.tar.bz2
manaverse-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.tar.xz
manaverse-19b82b4dad9b66418a4e7d0ed0ba23d0cab17216.zip
Remove default parameters from Being::setSpeech.
Diffstat (limited to 'src/net/tmwa/chatrecv.cpp')
-rw-r--r--src/net/tmwa/chatrecv.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/net/tmwa/chatrecv.cpp b/src/net/tmwa/chatrecv.cpp
index a23dc92a4..42cac06f4 100644
--- a/src/net/tmwa/chatrecv.cpp
+++ b/src/net/tmwa/chatrecv.cpp
@@ -59,11 +59,10 @@ void ChatRecv::processChat(Net::MessageIn &msg)
return;
}
- processChatContinue(msg.readRawString(chatMsgLength, "message"), "");
+ processChatContinue(msg.readRawString(chatMsgLength, "message"));
}
-void ChatRecv::processChatContinue(std::string chatMsg,
- const std::string &channel)
+void ChatRecv::processChatContinue(std::string chatMsg)
{
const size_t pos = chatMsg.find(" : ", 0);
@@ -72,25 +71,21 @@ void ChatRecv::processChatContinue(std::string chatMsg,
{
allow = chatWindow->resortChatLog(chatMsg,
ChatMsgType::BY_PLAYER,
- channel,
+ GENERAL_CHANNEL,
IgnoreRecord_false,
TryRemoveColors_true);
}
- if (channel.empty())
+ const std::string senseStr("You sense the following: ");
+ if ((actorManager != nullptr) && (chatMsg.find(senseStr) == 0u))
{
- const std::string senseStr("You sense the following: ");
- if ((actorManager != nullptr) && (chatMsg.find(senseStr) == 0u))
- {
- actorManager->parseLevels(
- chatMsg.substr(senseStr.size()));
- }
+ actorManager->parseLevels(
+ chatMsg.substr(senseStr.size()));
}
if (pos == std::string::npos &&
!Ea::ChatRecv::mShowMotd &&
- Ea::ChatRecv::mSkipping &&
- channel.empty())
+ Ea::ChatRecv::mSkipping)
{
// skip motd from "new" tmw server
if (Ea::ChatRecv::mMotdTime == 0)
@@ -113,8 +108,8 @@ void ChatRecv::processChatContinue(std::string chatMsg,
if (localPlayer != nullptr)
{
- if (((chatWindow != nullptr) || Ea::ChatRecv::mShowMotd) && allow)
- localPlayer->setSpeech(chatMsg, channel);
+ if ((chatWindow != nullptr || Ea::ChatRecv::mShowMotd) && allow)
+ localPlayer->setSpeech(chatMsg);
}
BLOCK_END("ChatRecv::processChat")
}
@@ -367,7 +362,7 @@ void ChatRecv::processBeingChat(Net::MessageIn &msg)
playerRelations.hasPermission(sender_name,
PlayerRelation::SPEECH_FLOAT))
{
- being->setSpeech(chatMsg, GENERAL_CHANNEL);
+ being->setSpeech(chatMsg);
}
BLOCK_END("ChatRecv::processBeingChat")
}