summaryrefslogtreecommitdiff
path: root/src/gui/windows/chatwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/chatwindow.cpp')
-rw-r--r--src/gui/windows/chatwindow.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 0934be0ff..940eb75e5 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -1537,18 +1537,25 @@ bool ChatWindow::resortChatLog(std::string line,
std::string prefix;
if (!channel.empty())
+ {
prefix = std::string("##3").append(channel).append("##0");
-
- if (findI(line, mTradeFilter) != std::string::npos)
+ }
+ else if (tradeChatTab &&
+ findI(line, mTradeFilter) != std::string::npos)
{
- if (tradeChatTab)
+ tradeChatTab->chatLog(std::string("##S") + _("Moved: ") + line,
+ own,
+ ignoreRecord,
+ tryRemoveColors);
+ if (own == ChatMsgType::BY_PLAYER)
{
- tradeChatTab->chatLog(prefix + line,
- own,
- ignoreRecord,
- tryRemoveColors);
+ own = ChatMsgType::BY_SERVER;
+ line = _("Your message was moved to trade tab");
+ }
+ else
+ {
+ return false;
}
- return false;
}
size_t idx2 = line.find(": ");