summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-05 00:33:36 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-05 00:33:36 +0300
commit6232cad8c5f1aee0df1acafd4d2b2a1f050bcf3e (patch)
treea73605db43f05f3cea9f0a431dc4cfa5f8236e0c /src/gui/chatwindow.cpp
parentb3e0dd932a4980c8c40a259e010f4c437d6f497d (diff)
downloadmv-6232cad8c5f1aee0df1acafd4d2b2a1f050bcf3e.tar.gz
mv-6232cad8c5f1aee0df1acafd4d2b2a1f050bcf3e.tar.bz2
mv-6232cad8c5f1aee0df1acafd4d2b2a1f050bcf3e.tar.xz
mv-6232cad8c5f1aee0df1acafd4d2b2a1f050bcf3e.zip
Add some special chars to ignore in public chat for future usage.
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r--src/gui/chatwindow.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 11f399537..c0258eade 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -1410,12 +1410,19 @@ void ChatWindow::resortChatLog(std::string line, Own own,
return;
}
- const size_t idx = line.find(": \302\202");
- if (idx != std::string::npos)
+ const size_t idx2 = line.find(": ");
+ if (idx2 != std::string::npos)
{
- line = line.erase(idx + 2, 2);
- tradeChatTab->chatLog(line, own, ignoreRecord, tryRemoveColors);
- return;
+ const size_t idx = line.find(": \302\202");
+ if (idx == idx2)
+ {
+ // ignore special message formats.
+ if (line.find(": \302\202\302") != std::string::npos)
+ return;
+ line = line.erase(idx + 2, 2);
+ tradeChatTab->chatLog(line, own, ignoreRecord, tryRemoveColors);
+ return;
+ }
}
const size_t idx1 = line.find("@@");