summaryrefslogtreecommitdiff
path: root/src/chat.cpp
diff options
context:
space:
mode:
authorEkdohibs <nathanael.courant@laposte.net>2016-03-15 13:34:27 +0100
committerest31 <MTest31@outlook.com>2016-03-15 17:33:15 +0100
commit095f623fa7278375a6fa4fe01ed39d2b68cce7af (patch)
treeef8aa35d767870c6f47a115bfd1e1ca47d4deeca /src/chat.cpp
parentaf30183124d40a969040d7de4b3a487feec466e4 (diff)
downloadminetest-095f623fa7278375a6fa4fe01ed39d2b68cce7af.tar.gz
minetest-095f623fa7278375a6fa4fe01ed39d2b68cce7af.tar.bz2
minetest-095f623fa7278375a6fa4fe01ed39d2b68cce7af.zip
Remove chat escape sequences from chat messages, for future colored chat.
Diffstat (limited to 'src/chat.cpp')
-rw-r--r--src/chat.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/chat.cpp b/src/chat.cpp
index 809d4e422..495e3450b 100644
--- a/src/chat.cpp
+++ b/src/chat.cpp
@@ -679,6 +679,9 @@ ChatBackend::~ChatBackend()
void ChatBackend::addMessage(std::wstring name, std::wstring text)
{
+ name = removeChatEscapes(name);
+ text = removeChatEscapes(text);
+
// Note: A message may consist of multiple lines, for example the MOTD.
WStrfnd fnd(text);
while (!fnd.atend())