Ticket #3549: no-save-lobby-ips.diff

File no-save-lobby-ips.diff, 1.1 KB (added by Josh, 9 years ago)

Don't save the host ip or player name if joining through the lobby

  • binaries/data/mods/public/gui/gamesetup/gamesetup_mp.js

     
    226226
    227227function startJoin(playername, ip)
    228228{
    229     // Save player name and host address
    230     Engine.ConfigDB_CreateValue("user", "playername", playername);
    231     Engine.ConfigDB_CreateValue("user", "multiplayerserver", ip);
    232     Engine.ConfigDB_WriteFile("user", "config/user.cfg");
    233 
    234229    try
    235230    {
    236231        if (g_userRating)
     
    248243    }
    249244
    250245    startConnectionStatus("client");
    251     // Set player lobby presence
     246
    252247    if (Engine.HasXmppClient())
     248        // Set player lobby presence
    253249        Engine.LobbySetPlayerPresence("playing");
     250    else {
     251        // Only save the player name and host address if they're valid and we're not in the lobby
     252        Engine.ConfigDB_CreateValue("user", "playername", playername);
     253        Engine.ConfigDB_CreateValue("user", "multiplayerserver", ip);
     254        Engine.ConfigDB_WriteFile("user", "config/user.cfg");
     255    }
    254256    return true;
    255257}
    256258