Remove Password and Endpoint from OrderManager
This commit is contained in:
@@ -40,7 +40,7 @@ namespace OpenRA.Network
|
||||
void Receive(Action<int, byte[]> packetFn);
|
||||
}
|
||||
|
||||
class EchoConnection : IConnection
|
||||
public class EchoConnection : IConnection
|
||||
{
|
||||
protected struct ReceivedPacket
|
||||
{
|
||||
@@ -136,9 +136,9 @@ namespace OpenRA.Network
|
||||
}
|
||||
}
|
||||
|
||||
sealed class NetworkConnection : EchoConnection
|
||||
public sealed class NetworkConnection : EchoConnection
|
||||
{
|
||||
readonly ConnectionTarget target;
|
||||
public readonly ConnectionTarget Target;
|
||||
TcpClient tcp;
|
||||
IPEndPoint endpoint;
|
||||
readonly List<byte[]> queuedSyncPackets = new List<byte[]>();
|
||||
@@ -153,7 +153,7 @@ namespace OpenRA.Network
|
||||
|
||||
public NetworkConnection(ConnectionTarget target)
|
||||
{
|
||||
this.target = target;
|
||||
Target = target;
|
||||
new Thread(NetworkConnectionConnect)
|
||||
{
|
||||
Name = $"{GetType().Name} (connect to {target})",
|
||||
@@ -166,7 +166,7 @@ namespace OpenRA.Network
|
||||
var queue = new BlockingCollection<TcpClient>();
|
||||
|
||||
var atLeastOneEndpoint = false;
|
||||
foreach (var endpoint in target.GetConnectEndPoints())
|
||||
foreach (var endpoint in Target.GetConnectEndPoints())
|
||||
{
|
||||
atLeastOneEndpoint = true;
|
||||
new Thread(() =>
|
||||
|
||||
@@ -28,9 +28,6 @@ namespace OpenRA.Network
|
||||
public Session.Client LocalClient => LobbyInfo.ClientWithIndex(Connection.LocalClientId);
|
||||
public World World;
|
||||
|
||||
public readonly ConnectionTarget Endpoint;
|
||||
public readonly string Password = "";
|
||||
|
||||
public string ServerError = null;
|
||||
public bool AuthenticationFailed = false;
|
||||
public ExternalMod ServerExternalMod = null;
|
||||
@@ -94,10 +91,8 @@ namespace OpenRA.Network
|
||||
Connection.Send(i, new List<byte[]>());
|
||||
}
|
||||
|
||||
public OrderManager(ConnectionTarget endpoint, string password, IConnection conn)
|
||||
public OrderManager(IConnection conn)
|
||||
{
|
||||
Endpoint = endpoint;
|
||||
Password = password;
|
||||
Connection = conn;
|
||||
syncReport = new SyncReport(this);
|
||||
AddChatLine += CacheChatLine;
|
||||
|
||||
@@ -17,7 +17,7 @@ using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Network
|
||||
{
|
||||
sealed class ReplayRecorder
|
||||
public sealed class ReplayRecorder
|
||||
{
|
||||
// Arbitrary value.
|
||||
const int CreateReplayFileMaxRetryCount = 128;
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace OpenRA.Network
|
||||
Client = info,
|
||||
Mod = mod.Id,
|
||||
Version = mod.Metadata.Version,
|
||||
Password = orderManager.Password,
|
||||
Password = CurrentServerSettings.Password,
|
||||
Fingerprint = localProfile.Fingerprint,
|
||||
OrdersProtocol = ProtocolVersion.Orders
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user