summaryrefslogtreecommitdiff
path: root/src/net/ea/chathandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-12-25 01:36:11 +0300
committerAndrei Karas <akaras@inbox.ru>2013-12-25 01:36:11 +0300
commit02d2f61628927de7b86bba2f9455dcf05c37f78d (patch)
tree6695cc67764a94d2f3a0fd36afafb2bd06976089 /src/net/ea/chathandler.cpp
parente31bec39543cf616daac1be9b0d700a72a46b648 (diff)
downloadplus-02d2f61628927de7b86bba2f9455dcf05c37f78d.tar.gz
plus-02d2f61628927de7b86bba2f9455dcf05c37f78d.tar.bz2
plus-02d2f61628927de7b86bba2f9455dcf05c37f78d.tar.xz
plus-02d2f61628927de7b86bba2f9455dcf05c37f78d.zip
dont show over head text if text ignored or going to trade tab.
Diffstat (limited to 'src/net/ea/chathandler.cpp')
-rw-r--r--src/net/ea/chathandler.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index a10bf931d..267d1102d 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -310,17 +310,18 @@ void ChatHandler::processBeingChat(Net::MessageIn &msg,
trim(chatMsg);
+ bool allow(true);
// We use getIgnorePlayer instead of ignoringPlayer here
// because ignorePlayer' side effects are triggered
// right below for Being::IGNORE_SPEECH_FLOAT.
if (player_relations.checkPermissionSilently(sender_name,
PlayerRelation::SPEECH_LOG) && chatWindow)
{
- chatWindow->resortChatLog(removeColors(sender_name)
+ allow = chatWindow->resortChatLog(removeColors(sender_name)
.append(" : ").append(chatMsg), BY_OTHER, channel, false, true);
}
- if (player_relations.hasPermission(sender_name,
+ if (allow && player_relations.hasPermission(sender_name,
PlayerRelation::SPEECH_FLOAT))
{
being->setSpeech(chatMsg, channel);
@@ -352,9 +353,10 @@ void ChatHandler::processChat(Net::MessageIn &msg, const bool normalChat,
if (normalChat)
{
+ bool allow(true);
if (chatWindow)
{
- chatWindow->resortChatLog(chatMsg, BY_PLAYER,
+ allow = chatWindow->resortChatLog(chatMsg, BY_PLAYER,
channel, false, true);
}
@@ -386,7 +388,7 @@ void ChatHandler::processChat(Net::MessageIn &msg, const bool normalChat,
if (player_node)
{
- if (chatWindow || mShowMotd)
+ if ((chatWindow || mShowMotd) && allow)
player_node->setSpeech(chatMsg, channel);
}
}