mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
Make logger automatically put a newline (#675)
at the end of the line remove all the newlines in log calls
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
void ClientPackets::HandleChatMessage(const SystemAddress& sysAddr, Packet* packet) {
|
||||
User* user = UserManager::Instance()->GetUser(sysAddr);
|
||||
if (!user) {
|
||||
Game::logger->Log("ClientPackets", "Unable to get user to parse chat message\n");
|
||||
Game::logger->Log("ClientPackets", "Unable to get user to parse chat message");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -71,14 +71,14 @@ void ClientPackets::HandleChatMessage(const SystemAddress& sysAddr, Packet* pack
|
||||
if (!user->GetLastChatMessageApproved() && !isMythran) return;
|
||||
|
||||
std::string sMessage = GeneralUtils::UTF16ToWTF8(message);
|
||||
Game::logger->Log("Chat", "%s: %s\n", playerName.c_str(), sMessage.c_str());
|
||||
Game::logger->Log("Chat", "%s: %s", playerName.c_str(), sMessage.c_str());
|
||||
ChatPackets::SendChatMessage(sysAddr, chatChannel, playerName, user->GetLoggedInChar(), isMythran, message);
|
||||
}
|
||||
|
||||
void ClientPackets::HandleClientPositionUpdate(const SystemAddress& sysAddr, Packet* packet) {
|
||||
User* user = UserManager::Instance()->GetUser(sysAddr);
|
||||
if (!user) {
|
||||
Game::logger->Log("ClientPackets", "Unable to get user to parse position update\n");
|
||||
Game::logger->Log("ClientPackets", "Unable to get user to parse position update");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -240,14 +240,14 @@ void ClientPackets::HandleClientPositionUpdate(const SystemAddress& sysAddr, Pac
|
||||
void ClientPackets::HandleChatModerationRequest(const SystemAddress& sysAddr, Packet* packet) {
|
||||
User* user = UserManager::Instance()->GetUser(sysAddr);
|
||||
if (!user) {
|
||||
Game::logger->Log("ClientPackets", "Unable to get user to parse chat moderation request\n");
|
||||
Game::logger->Log("ClientPackets", "Unable to get user to parse chat moderation request");
|
||||
return;
|
||||
}
|
||||
|
||||
auto* entity = Player::GetPlayer(sysAddr);
|
||||
|
||||
if (entity == nullptr) {
|
||||
Game::logger->Log("ClientPackets", "Unable to get player to parse chat moderation request\n");
|
||||
Game::logger->Log("ClientPackets", "Unable to get player to parse chat moderation request");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user