# HG changeset patch # User Wuzzy # Date 1540486464 -7200 # Node ID f791c46b47a4073200f2c874f085e5bbfe656ea6 # Parent 4d761adb4e6c7f6fae2035a5eddbf6a5eed4cb39 Remove double space at end of chat messages from server diff -r 4d761adb4e6c -r f791c46b47a4 QTfrontend/game.cpp --- 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); } diff -r 4d761adb4e6c -r f791c46b47a4 gameServer/HWProtoInRoomState.hs --- 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] - 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