@@ -1387,14 +1387,14 @@ void ServerLobby::liveJoinRequest(Event* event)
13871387 for (int id : used_id)
13881388 {
13891389 Log::info (" ServerLobby" , " %s live joining with reserved kart id %d." ,
1390- peer->getAddress (). toString ().c_str (), id);
1390+ peer->getRealAddress ().c_str (), id);
13911391 peer->addAvailableKartID (id);
13921392 }
13931393 }
13941394 else
13951395 {
13961396 Log::info (" ServerLobby" , " %s spectating now." ,
1397- peer->getAddress (). toString ().c_str ());
1397+ peer->getRealAddress ().c_str ());
13981398 }
13991399
14001400 std::vector<std::shared_ptr<NetworkPlayerProfile> > players =
@@ -1532,7 +1532,7 @@ void ServerLobby::finishedLoadingLiveJoinClient(Event* event)
15321532 if (!live_joined_in_time)
15331533 {
15341534 Log::warn (" ServerLobby" , " %s can't live-join in time." ,
1535- peer->getAddress (). toString ().c_str ());
1535+ peer->getRealAddress ().c_str ());
15361536 rejectLiveJoin (peer.get (), BLR_NO_GAME_FOR_LIVE_JOIN);
15371537 return ;
15381538 }
@@ -1553,12 +1553,12 @@ void ServerLobby::finishedLoadingLiveJoinClient(Event* event)
15531553 const RemoteKartInfo& rki = race_manager->getKartInfo (id);
15541554 addLiveJoiningKart (id, rki, m_last_live_join_util_ticks);
15551555 Log::info (" ServerLobby" , " %s succeeded live-joining with kart id %d." ,
1556- peer->getAddress (). toString ().c_str (), id);
1556+ peer->getRealAddress ().c_str (), id);
15571557 }
15581558 if (peer->getAvailableKartIDs ().empty ())
15591559 {
15601560 Log::info (" ServerLobby" , " %s spectating succeeded." ,
1561- peer->getAddress (). toString ().c_str ());
1561+ peer->getRealAddress ().c_str ());
15621562 spectator = true ;
15631563 }
15641564
@@ -1631,7 +1631,7 @@ void ServerLobby::update(int ticks)
16311631 // Remove loading world too long (60 seconds) live join peer
16321632 Log::info (" ServerLobby" , " %s hasn't live-joined within"
16331633 " 60 seconds, remove it." ,
1634- peer->getAddress (). toString ().c_str ());
1634+ peer->getRealAddress ().c_str ());
16351635 rki.makeReserved ();
16361636 continue ;
16371637 }
@@ -1642,7 +1642,7 @@ void ServerLobby::update(int ticks)
16421642 continue ;
16431643 Log::info (" ServerLobby" , " %s %s has been idle for more than"
16441644 " %d seconds, kick." ,
1645- peer->getAddress (). toString ().c_str (),
1645+ peer->getRealAddress ().c_str (),
16461646 StringUtils::wideToUtf8 (rki.getPlayerName ()).c_str (), sec);
16471647 peer->kick ();
16481648 }
@@ -3010,7 +3010,7 @@ void ServerLobby::handleUnencryptedConnection(std::shared_ptr<STKPeer> peer,
30103010 Log::info (" ServerLobby" ,
30113011 " New player %s with online id %u from %s with %s." ,
30123012 StringUtils::wideToUtf8 (npp->getName ()).c_str (),
3013- npp->getOnlineId (), peer->getAddress (). toString ().c_str (),
3013+ npp->getOnlineId (), peer->getRealAddress ().c_str (),
30143014 peer->getUserVersion ().c_str ());
30153015 }
30163016 }
@@ -3727,7 +3727,7 @@ void ServerLobby::configPeersStartTime()
37273727 {
37283728 Log::warn (" ServerLobby" ,
37293729 " Peer %s cannot catch up with max ping %d." ,
3730- peer->getAddress (). toString ().c_str (), max_ping);
3730+ peer->getRealAddress ().c_str (), max_ping);
37313731 continue ;
37323732 }
37333733 max_ping = std::max (peer->getAveragePing (), max_ping);
@@ -3802,7 +3802,7 @@ void ServerLobby::addWaitingPlayersToGame()
38023802 " New player %s with online id %u from %s with %s." ,
38033803 StringUtils::wideToUtf8 (profile->getName ()).c_str (),
38043804 profile->getOnlineId (),
3805- peer->getAddress (). toString ().c_str (),
3805+ peer->getRealAddress ().c_str (),
38063806 peer->getUserVersion ().c_str ());
38073807 }
38083808 }
@@ -3868,7 +3868,7 @@ void ServerLobby::testBannedForIP(STKPeer* peer) const
38683868 const char * desc = (char *)sqlite3_column_text (stmt, 4 );
38693869 Log::info (" ServerLobby" , " %s banned by IP: %s "
38703870 " (rowid: %d, description: %s)." ,
3871- peer->getAddress (). toString ().c_str (), reason, row_id, desc);
3871+ peer->getRealAddress ().c_str (), reason, row_id, desc);
38723872 kickPlayerWithReason (peer, reason);
38733873 }
38743874 ret = sqlite3_finalize (stmt);
@@ -3927,7 +3927,7 @@ void ServerLobby::testBannedForOnlineId(STKPeer* peer,
39273927 const char * desc = (char *)sqlite3_column_text (stmt, 2 );
39283928 Log::info (" ServerLobby" , " %s banned by online id: %s "
39293929 " (online id: %u rowid: %d, description: %s)." ,
3930- peer->getAddress (). toString ().c_str (), reason, online_id,
3930+ peer->getRealAddress ().c_str (), reason, online_id,
39313931 row_id, desc);
39323932 kickPlayerWithReason (peer, reason);
39333933 }
@@ -4329,7 +4329,7 @@ void ServerLobby::clientInGameWantsToBackLobby(Event* event)
43294329 if (!w || !worldIsActive () || peer->isWaitingForGame ())
43304330 {
43314331 Log::warn (" ServerLobby" , " %s try to leave the game at wrong time." ,
4332- peer->getAddress (). toString ().c_str ());
4332+ peer->getRealAddress ().c_str ());
43334333 return ;
43344334 }
43354335
@@ -4339,14 +4339,14 @@ void ServerLobby::clientInGameWantsToBackLobby(Event* event)
43394339 if (rki.getHostId () == peer->getHostId ())
43404340 {
43414341 Log::info (" ServerLobby" , " %s left the game with kart id %d." ,
4342- peer->getAddress (). toString ().c_str (), id);
4342+ peer->getRealAddress ().c_str (), id);
43434343 rki.setNetworkPlayerProfile (
43444344 std::shared_ptr<NetworkPlayerProfile>());
43454345 }
43464346 else
43474347 {
43484348 Log::error (" ServerLobby" , " %s doesn't exist anymore in server." ,
4349- peer->getAddress (). toString ().c_str ());
4349+ peer->getRealAddress ().c_str ());
43504350 }
43514351 }
43524352 NetworkItemManager* nim =
@@ -4382,7 +4382,7 @@ void ServerLobby::clientSelectingAssetsWantsToBackLobby(Event* event)
43824382 {
43834383 Log::warn (" ServerLobby" ,
43844384 " %s try to leave selecting assets at wrong time." ,
4385- peer->getAddress (). toString ().c_str ());
4385+ peer->getRealAddress ().c_str ());
43864386 return ;
43874387 }
43884388
0 commit comments