Add missing ip address to player join log entry
authorsapier <Sapier at GMX dot net>
Mon, 21 Apr 2014 20:28:52 +0000 (22:28 +0200)
committersapier <Sapier at GMX dot net>
Mon, 21 Apr 2014 20:28:52 +0000 (22:28 +0200)
src/server.cpp

index 3ec6fee26df546f7d4c65f1879dbabafd54829da..fc01898cc42defab3e580340a04340cd12455c97 100644 (file)
@@ -1280,8 +1280,9 @@ PlayerSAO* Server::StageTwoClientInit(u16 peer_id)
                        SendChatMessage(PEER_ID_INEXISTENT,message);
                }
        }
-
-       actionstream<<player->getName() <<" joins game. " << std::endl;
+       Address addr = getPeerAddress(player->peer_id);
+       std::string ip_str = addr.serializeString();
+       actionstream<<player->getName() <<" [" << ip_str << "] joins game. " << std::endl;
        /*
                Print out action
        */