From 5c990ec4917e081a66840384b21bb1f81edcb4c5 Mon Sep 17 00:00:00 2001 From: tritonas00 Date: Mon, 8 Feb 2021 05:26:43 +0200 Subject: [PATCH 1/3] removed extra username text --- source/main/network/Network.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/main/network/Network.cpp b/source/main/network/Network.cpp index 2ed45e5171..195258677b 100644 --- a/source/main/network/Network.cpp +++ b/source/main/network/Network.cpp @@ -311,7 +311,7 @@ void Network::RecvThread() { // Console is now threadsafe, no need to send fake chatmessages to ourselves Str<300> text; - text << user->username << _L(" left the game"); + text << _L(" left the game"); App::GetConsole()->putNetMessage(user->uniqueid, Console::CONSOLE_SYSTEM_NOTICE, text.ToCStr()); LOG_THREAD(text); @@ -337,7 +337,6 @@ void Network::RecvThread() { memcpy(&user_info, buffer, sizeof(RoRnet::UserInfo)); Str<300> text; - text << user_info.username; if (user_info.authstatus != 0) // Show nothing for guests (no special authorization) { text << " (" << UserAuthToStringShort(user_info) << ")"; From 3497f69cfe63316fe77a68457d806cd45adb8ddf Mon Sep 17 00:00:00 2001 From: tritonas00 Date: Mon, 8 Feb 2021 05:50:48 +0200 Subject: [PATCH 2/3] removed extra leading spaces --- source/main/network/Network.cpp | 4 ++-- source/main/physics/ActorManager.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/main/network/Network.cpp b/source/main/network/Network.cpp index 195258677b..8a827657d8 100644 --- a/source/main/network/Network.cpp +++ b/source/main/network/Network.cpp @@ -311,7 +311,7 @@ void Network::RecvThread() { // Console is now threadsafe, no need to send fake chatmessages to ourselves Str<300> text; - text << _L(" left the game"); + text << _L("left the game"); App::GetConsole()->putNetMessage(user->uniqueid, Console::CONSOLE_SYSTEM_NOTICE, text.ToCStr()); LOG_THREAD(text); @@ -339,7 +339,7 @@ void Network::RecvThread() Str<300> text; if (user_info.authstatus != 0) // Show nothing for guests (no special authorization) { - text << " (" << UserAuthToStringShort(user_info) << ")"; + text << "(" << UserAuthToStringShort(user_info) << ")"; } text << _L(" joined the game"); diff --git a/source/main/physics/ActorManager.cpp b/source/main/physics/ActorManager.cpp index 1c39058517..bc2f6b8eea 100644 --- a/source/main/physics/ActorManager.cpp +++ b/source/main/physics/ActorManager.cpp @@ -403,7 +403,7 @@ void ActorManager::HandleActorStreamData(std::vector packet_ else { Str<200> text; - text << _L(" spawned a new vehicle: ") << filename; + text << _L("spawned a new vehicle: ") << filename; App::GetConsole()->putNetMessage( reg->origin_sourceid, Console::CONSOLE_SYSTEM_NOTICE, text.ToCStr()); From d53e3c7f848fb90e7c0eef11a73be5be2abc2b78 Mon Sep 17 00:00:00 2001 From: tritonas00 Date: Mon, 8 Feb 2021 06:11:08 +0200 Subject: [PATCH 3/3] correct space order --- source/main/network/Network.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/main/network/Network.cpp b/source/main/network/Network.cpp index 8a827657d8..15f927cdd0 100644 --- a/source/main/network/Network.cpp +++ b/source/main/network/Network.cpp @@ -339,9 +339,9 @@ void Network::RecvThread() Str<300> text; if (user_info.authstatus != 0) // Show nothing for guests (no special authorization) { - text << "(" << UserAuthToStringShort(user_info) << ")"; + text << "(" << UserAuthToStringShort(user_info) << ") "; } - text << _L(" joined the game"); + text << _L("joined the game"); // NB: Console is threadsafe App::GetConsole()->putNetMessage(