1
0
Fork 0
mirror of https://github.com/demostf/demo.js synced 2026-06-04 00:54:14 +02:00

text cleanup

This commit is contained in:
Robin Appelman 2015-01-27 18:41:11 +01:00
commit aaef2d237e

View file

@ -404,6 +404,11 @@ Packet.userMessageParsers = {
stream.readASCIIString();
stream.readASCIIString();
}
// cleanup color codes
text = text.replace('\u0001', '');
while ((pos = text.indexOf('\u0007')) !== -1) {
text = text.slice(0, pos) + text.slice(pos + 7);
}
return {
packetType: 'sayText2',
client : client,