diff --git a/src/Client.cpp b/src/Client.cpp index c2c3fac..b03c99a 100644 --- a/src/Client.cpp +++ b/src/Client.cpp @@ -62,11 +62,11 @@ void TClient::Disconnect(std::string_view Reason) { boost::system::error_code ec; mSocket.shutdown(socket_base::shutdown_both, ec); if (ec) { - beammp_warnf("Failed to shutdown client socket: {}", ec.message()); + beammp_debugf("Failed to shutdown client socket: {}", ec.message()); } mSocket.close(ec); if (ec) { - beammp_warnf("Failed to close client socket: {}", ec.message()); + beammp_debugf("Failed to close client socket: {}", ec.message()); } } diff --git a/src/TNetwork.cpp b/src/TNetwork.cpp index b13e090..ef92c8c 100644 --- a/src/TNetwork.cpp +++ b/src/TNetwork.cpp @@ -273,7 +273,7 @@ std::shared_ptr TNetwork::Authentication(TConnection&& RawConnection) { return nullptr; } } catch (const std::exception& e) { - beammp_errorf("Client sent invalid key: {}", e.what()); + beammp_errorf("Client sent invalid key. Error was: {}", e.what()); // TODO: we should really clarify that this was a backend response or parsing error ClientKick(*Client, "Invalid key! Please restart your game."); return nullptr; @@ -425,7 +425,7 @@ std::vector TNetwork::TCPRcv(TClient& c) { void TNetwork::ClientKick(TClient& c, const std::string& R) { beammp_info("Client kicked: " + R); if (!TCPSend(c, StringToVector("K" + R))) { - beammp_warn("tried to kick player '" + c.GetName() + "' (id " + std::to_string(c.GetID()) + "), but was already disconnected"); + beammp_debugf("tried to kick player '{}' (id {}), but was already connected", c.GetName(), c.GetID()); } c.Disconnect("Kicked"); } diff --git a/src/TServer.cpp b/src/TServer.cpp index 7e2a3d7..f160e6a 100644 --- a/src/TServer.cpp +++ b/src/TServer.cpp @@ -225,7 +225,7 @@ bool TServer::IsUnicycle(TClient& c, const std::string& CarJson) { return true; } } catch (const std::exception& e) { - beammp_error("Failed to parse vehicle data as json for client " + std::to_string(c.GetID()) + ": '" + CarJson + "'"); + beammp_warn("Failed to parse vehicle data as json for client " + std::to_string(c.GetID()) + ": '" + CarJson + "'."); } return false; }