aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim <MoNTE48@mail.ua>2020-03-08 18:24:32 +0100
committerGitHub <noreply@github.com>2020-03-08 18:24:32 +0100
commit0cb34ce158989b66ecd42257dbed6729a338ff1e (patch)
treecf52d718936668b09037b1fa34562c4b46a1ac36
parentc49575ef97c3c88864263d460ce4d90ecb0cba9e (diff)
downloadminetest-0cb34ce158989b66ecd42257dbed6729a338ff1e.tar.gz
minetest-0cb34ce158989b66ecd42257dbed6729a338ff1e.tar.bz2
minetest-0cb34ce158989b66ecd42257dbed6729a338ff1e.zip
Fix 2 log messages when player joined to game (#9477)
-rw-r--r--src/server.cpp7
1 files 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<<player->getName() <<" [" << ip_str << "] joins game. " << std::endl;
/*
Print out action
*/
{
+ Address addr = getPeerAddress(player->getPeerId());
+ std::string ip_str = addr.serializeString();
const std::vector<std::string> &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 << " ";