From 0cb34ce158989b66ecd42257dbed6729a338ff1e Mon Sep 17 00:00:00 2001 From: Maksim Date: Sun, 8 Mar 2020 18:24:32 +0100 Subject: [PATCH] Fix 2 log messages when player joined to game (#9477) --- src/server.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/server.cpp b/src/server.cpp index f9d8ed361..239ddd92e 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1018,16 +1018,15 @@ PlayerSAO* Server::StageTwoClientInit(session_t peer_id) // Send Breath SendPlayerBreath(playersao); - Address addr = getPeerAddress(player->getPeerId()); - std::string ip_str = addr.serializeString(); - actionstream<getName() <<" [" << ip_str << "] joins game. " << std::endl; /* Print out action */ { + Address addr = getPeerAddress(player->getPeerId()); + std::string ip_str = addr.serializeString(); const std::vector &names = m_clients.getPlayerNames(); - actionstream << player->getName() << " joins game. List of players: "; + actionstream << player->getName() << " [" << ip_str << "] joins game. List of players: "; for (const std::string &name : names) { actionstream << name << " "; -- 2.25.1