Backed out changeset f791c46b47a4
authorWuzzy <Wuzzy2@mail.ru>
Fri, 14 Dec 2018 16:05:56 +0100
changeset 14452 b444f100a625
parent 14451 cb08cecc3bab
child 14453 34c5689687c4
Backed out changeset f791c46b47a4 This changeset broke chat display in demos
QTfrontend/game.cpp
gameServer/HWProtoInRoomState.hs
--- a/QTfrontend/game.cpp	Fri Dec 14 14:33:18 2018 +0100
+++ b/QTfrontend/game.cpp	Fri Dec 14 16:05:56 2018 +0100
@@ -288,7 +288,7 @@
             QString msgbody = QString::fromUtf8(msg.mid(2).left(size - 4));
             emit SendChat(msgbody);
             QByteArray buf;
-            HWProto::addStringToBuffer(buf, "s" + HWProto::formatChatMsg(config->netNick(), msgbody));
+            HWProto::addStringToBuffer(buf, "s" + HWProto::formatChatMsg(config->netNick(), msgbody) + "\x20\x20");
             demo.append(buf);
             break;
         }
@@ -342,21 +342,21 @@
 void HWGame::FromNetChat(const QString & msg)
 {
     QByteArray buf;
-    HWProto::addStringToBuffer(buf, 's' + msg);
+    HWProto::addStringToBuffer(buf, 's' + msg + "\x20\x20");
     RawSendIPC(buf);
 }
 
 void HWGame::FromNetWarning(const QString & msg)
 {
     QByteArray buf;
-    HWProto::addStringToBuffer(buf, "s\x00" + msg);
+    HWProto::addStringToBuffer(buf, "s\x00" + msg + "\x20\x20");
     RawSendIPC(buf);
 }
 
 void HWGame::FromNetError(const QString & msg)
 {
     QByteArray buf;
-    HWProto::addStringToBuffer(buf, "s\x05" + msg);
+    HWProto::addStringToBuffer(buf, "s\x05" + msg + "\x20\x20");
     RawSendIPC(buf);
 }
 
--- a/gameServer/HWProtoInRoomState.hs	Fri Dec 14 14:33:18 2018 +0100
+++ b/gameServer/HWProtoInRoomState.hs	Fri Dec 14 16:05:56 2018 +0100
@@ -382,7 +382,7 @@
     where
         -- This is formatted in a way so it can parsed by engine to make it translatable
         -- Format: b<PLAYER NAME>]<MESSAGE>
-        engineMsg cl = toEngineMsg $ B.concat ["b", nick cl, "]", msg]
+        engineMsg cl = toEngineMsg $ B.concat ["b", nick cl, "]", msg, "\x20\x20"]
 
 
 handleCmd_inRoom ["BAN", banNick] = do