Remove double space at end of chat messages from server
authorWuzzy <Wuzzy2@mail.ru>
Thu, 25 Oct 2018 18:54:24 +0200
changeset 13970 f791c46b47a4
parent 13969 4d761adb4e6c
child 13971 63957d0e62ac
Remove double space at end of chat messages from server
QTfrontend/game.cpp
gameServer/HWProtoInRoomState.hs
--- a/QTfrontend/game.cpp	Thu Oct 25 18:35:35 2018 +0200
+++ b/QTfrontend/game.cpp	Thu Oct 25 18:54:24 2018 +0200
@@ -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) + "\x20\x20");
+            HWProto::addStringToBuffer(buf, "s" + HWProto::formatChatMsg(config->netNick(), msgbody));
             demo.append(buf);
             break;
         }
@@ -342,21 +342,21 @@
 void HWGame::FromNetChat(const QString & msg)
 {
     QByteArray buf;
-    HWProto::addStringToBuffer(buf, 's' + msg + "\x20\x20");
+    HWProto::addStringToBuffer(buf, 's' + msg);
     RawSendIPC(buf);
 }
 
 void HWGame::FromNetWarning(const QString & msg)
 {
     QByteArray buf;
-    HWProto::addStringToBuffer(buf, "s\x00" + msg + "\x20\x20");
+    HWProto::addStringToBuffer(buf, "s\x00" + msg);
     RawSendIPC(buf);
 }
 
 void HWGame::FromNetError(const QString & msg)
 {
     QByteArray buf;
-    HWProto::addStringToBuffer(buf, "s\x05" + msg + "\x20\x20");
+    HWProto::addStringToBuffer(buf, "s\x05" + msg);
     RawSendIPC(buf);
 }
 
--- a/gameServer/HWProtoInRoomState.hs	Thu Oct 25 18:35:35 2018 +0200
+++ b/gameServer/HWProtoInRoomState.hs	Thu Oct 25 18:54:24 2018 +0200
@@ -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, "\x20\x20"]
+        engineMsg cl = toEngineMsg $ B.concat ["b", nick cl, "]", msg]
 
 
 handleCmd_inRoom ["BAN", banNick] = do