Sync auth information with the master server.
This commit is contained in:
@@ -20,6 +20,7 @@ namespace OpenRA.Network
|
|||||||
public class GameClient
|
public class GameClient
|
||||||
{
|
{
|
||||||
public readonly string Name;
|
public readonly string Name;
|
||||||
|
public readonly string Fingerprint;
|
||||||
public readonly HSLColor Color;
|
public readonly HSLColor Color;
|
||||||
public readonly string Faction;
|
public readonly string Faction;
|
||||||
public readonly int Team;
|
public readonly int Team;
|
||||||
@@ -33,6 +34,7 @@ namespace OpenRA.Network
|
|||||||
public GameClient(Session.Client c)
|
public GameClient(Session.Client c)
|
||||||
{
|
{
|
||||||
Name = c.Name;
|
Name = c.Name;
|
||||||
|
Fingerprint = c.Fingerprint;
|
||||||
Color = c.Color;
|
Color = c.Color;
|
||||||
Faction = c.Faction;
|
Faction = c.Faction;
|
||||||
Team = c.Team;
|
Team = c.Team;
|
||||||
@@ -54,7 +56,7 @@ namespace OpenRA.Network
|
|||||||
"Mod", "Version", "ModTitle", "ModWebsite", "ModIcon32",
|
"Mod", "Version", "ModTitle", "ModWebsite", "ModIcon32",
|
||||||
|
|
||||||
// Current server state
|
// Current server state
|
||||||
"Map", "State", "MaxPlayers", "Protected"
|
"Map", "State", "MaxPlayers", "Protected", "Authentication"
|
||||||
};
|
};
|
||||||
|
|
||||||
public const int ProtocolVersion = 2;
|
public const int ProtocolVersion = 2;
|
||||||
@@ -98,6 +100,9 @@ namespace OpenRA.Network
|
|||||||
/// <summary>Password protected</summary>
|
/// <summary>Password protected</summary>
|
||||||
public readonly bool Protected = false;
|
public readonly bool Protected = false;
|
||||||
|
|
||||||
|
/// <summary>Players must be authenticated with the OpenRA forum</summary>
|
||||||
|
public readonly bool Authentication = false;
|
||||||
|
|
||||||
/// <summary>UTC datetime string when the game changed to the Playing state</summary>
|
/// <summary>UTC datetime string when the game changed to the Playing state</summary>
|
||||||
public readonly string Started = null;
|
public readonly string Started = null;
|
||||||
|
|
||||||
@@ -222,6 +227,7 @@ namespace OpenRA.Network
|
|||||||
ModWebsite = manifest.Metadata.Website;
|
ModWebsite = manifest.Metadata.Website;
|
||||||
ModIcon32 = manifest.Metadata.WebIcon32;
|
ModIcon32 = manifest.Metadata.WebIcon32;
|
||||||
Protected = !string.IsNullOrEmpty(server.Settings.Password);
|
Protected = !string.IsNullOrEmpty(server.Settings.Password);
|
||||||
|
Authentication = server.Settings.RequireAuthentication || server.Settings.ProfileIDWhitelist.Any();
|
||||||
Clients = server.LobbyInfo.Clients.Select(c => new GameClient(c)).ToArray();
|
Clients = server.LobbyInfo.Clients.Select(c => new GameClient(c)).ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user