Changed IP to Address
This commit is contained in:
parent
e65568cd62
commit
64e089ce58
@ -10,8 +10,8 @@ namespace CoopClient.Menus.Sub
|
||||
{
|
||||
internal class ServerListClass
|
||||
{
|
||||
[JsonProperty("ip")]
|
||||
public string IP { get; set; }
|
||||
[JsonProperty("address")]
|
||||
public string Address { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("version")]
|
||||
@ -89,20 +89,20 @@ namespace CoopClient.Menus.Sub
|
||||
foreach (ServerListClass server in serverList)
|
||||
{
|
||||
NativeItem tmpItem = null;
|
||||
MainMenu.Add(tmpItem = new NativeItem($"[{server.Country}] {server.Name}", $"~b~{server.IP}~s~~n~~g~Version {server.Version}.x~s~~n~Mods = {server.Mods}~n~NPCs = {server.NPCs}") { AltTitle = $"[{server.Players}/{server.MaxPlayers}][{(server.AllowList ? "~r~X~s~" : "~g~O~s~")}]"});
|
||||
MainMenu.Add(tmpItem = new NativeItem($"[{server.Country}] {server.Name}", $"~b~{server.Address}~s~~n~~g~Version {server.Version}.x~s~~n~Mods = {server.Mods}~n~NPCs = {server.NPCs}") { AltTitle = $"[{server.Players}/{server.MaxPlayers}][{(server.AllowList ? "~r~X~s~" : "~g~O~s~")}]"});
|
||||
tmpItem.Activated += (object sender, EventArgs e) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
MainMenu.Visible = false;
|
||||
|
||||
Main.MainNetworking.DisConnectFromServer(server.IP);
|
||||
Main.MainNetworking.DisConnectFromServer(server.Address);
|
||||
|
||||
Main.MainMenu.ServerIpItem.AltTitle = server.IP;
|
||||
Main.MainMenu.ServerIpItem.AltTitle = server.Address;
|
||||
|
||||
Main.MainMenu.MainMenu.Visible = true;
|
||||
|
||||
Main.MainSettings.LastServerAddress = server.IP;
|
||||
Main.MainSettings.LastServerAddress = server.Address;
|
||||
Util.SaveSettings();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
Loading…
x
Reference in New Issue
Block a user