From: Maksim Date: Sun, 8 Mar 2020 17:24:32 +0000 (+0100) Subject: Fix 2 log messages when player joined to game (#9477) X-Git-Tag: 5.2.0~81 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0cb34ce158989b66ecd42257dbed6729a338ff1e;p=oweals%2Fminetest.git Fix 2 log messages when player joined to game (#9477) --- 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 << " ";