mirror of
https://github.com/CommonLoon102/NBloodServerSupervisor.git
synced 2025-01-03 08:32:45 +01:00
bugfix: private servers were shown with port 0
This commit is contained in:
parent
0ac65ffd08
commit
6b1351ab0d
@ -63,14 +63,12 @@ namespace Supervisor
|
||||
{
|
||||
Port = packetData.Port,
|
||||
IsStarted = packetData.IsStarted,
|
||||
IsPrivate = packetData.IsPrivate,
|
||||
CurrentPlayers = packetData.CurrentPlayers,
|
||||
MaximumPlayers = packetData.MaximumPlayers
|
||||
},
|
||||
(port, server) =>
|
||||
{
|
||||
server.IsStarted = packetData.IsStarted;
|
||||
server.IsPrivate = packetData.IsPrivate;
|
||||
server.CurrentPlayers = packetData.CurrentPlayers;
|
||||
server.MaximumPlayers = packetData.MaximumPlayers;
|
||||
return server;
|
||||
|
@ -8,6 +8,5 @@ namespace Supervisor
|
||||
{
|
||||
public int Port { get; set; }
|
||||
public bool IsStarted { get; set; }
|
||||
public bool IsPrivate { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -61,6 +61,7 @@ namespace Supervisor
|
||||
int processId = int.Parse(split[1]);
|
||||
Program.State.Servers.AddOrUpdate(port, new Server()
|
||||
{
|
||||
Port = port,
|
||||
ProcessId = processId,
|
||||
IsPrivate = true
|
||||
},
|
||||
|
@ -58,8 +58,8 @@ namespace WebInterface.Controllers
|
||||
|
||||
_isBusy = true;
|
||||
|
||||
if (parameters.Players < 2)
|
||||
parameters.Players = 2;
|
||||
if (parameters.Players < 3)
|
||||
parameters.Players = 3;
|
||||
|
||||
if (parameters.ApiKey != _config.GetValue<string>("ApiKey"))
|
||||
return new StartServerResponse("Invalid ApiKey.");
|
||||
|
Loading…
Reference in New Issue
Block a user