Skip to content

Commit

Permalink
Set server name in client on start.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNexusAvenger committed Sep 10, 2021
1 parent 2b5950a commit bbfec7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions NLUL.Core/Client/ClientRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public bool VerifyExtractedClient()
/// </summary>
/// <param name="host">Host to launch.</param>
/// <returns>Process that was started.</returns>
public Process Launch(string host)
public Process Launch(ServerEntry host)
{
// Set up the runtime if it isn't installed.
if (!this.Runtime.IsInstalled)
Expand Down Expand Up @@ -217,7 +217,8 @@ public Process Launch(string host)
{
bootConfig = LegoDataDictionary.FromString(File.ReadAllText(Path.Combine(this.systemInfo.ClientLocation, "boot_backup.cfg")).Trim());
}
bootConfig["AUTHSERVERIP"] = host;
bootConfig["SERVERNAME"] = host.ServerName;
bootConfig["AUTHSERVERIP"] = host.ServerAddress;
File.WriteAllText(bootConfigLocation,bootConfig.ToString("\n"));

// Apply any pre-launch patches.
Expand Down
2 changes: 1 addition & 1 deletion NLUL.GUI/State/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ public static void ChangeParentDirectory(string destination)
public static Process Launch()
{
var selectedServer = PersistentState.SelectedServer;
return selectedServer != null ? ClientRunner.Launch(selectedServer.ServerAddress) : null;
return selectedServer != null ? ClientRunner.Launch(selectedServer) : null;
}
}
}

0 comments on commit bbfec7c

Please sign in to comment.