mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
convert GetPort to auto property
don't force disconnect player if someone is "in" their spot increase gamelogserver max time before purge
This commit is contained in:
@ -202,28 +202,33 @@ namespace IW4MAdmin.Application
|
||||
string lastCommand;
|
||||
var Origin = Utilities.IW4MAdminClient(ServerManager.Servers[0]);
|
||||
|
||||
while (!ServerManager.CancellationToken.IsCancellationRequested)
|
||||
try
|
||||
{
|
||||
lastCommand = Console.ReadLine();
|
||||
|
||||
if (lastCommand?.Length > 0)
|
||||
while (!ServerManager.CancellationToken.IsCancellationRequested)
|
||||
{
|
||||
lastCommand = Console.ReadLine();
|
||||
|
||||
if (lastCommand?.Length > 0)
|
||||
{
|
||||
GameEvent E = new GameEvent()
|
||||
if (lastCommand?.Length > 0)
|
||||
{
|
||||
Type = GameEvent.EventType.Command,
|
||||
Data = lastCommand,
|
||||
Origin = Origin,
|
||||
Owner = ServerManager.Servers[0]
|
||||
};
|
||||
GameEvent E = new GameEvent()
|
||||
{
|
||||
Type = GameEvent.EventType.Command,
|
||||
Data = lastCommand,
|
||||
Origin = Origin,
|
||||
Owner = ServerManager.Servers[0]
|
||||
};
|
||||
|
||||
ServerManager.GetEventHandler().AddEvent(E);
|
||||
await E.WaitAsync(Utilities.DefaultCommandTimeout, ServerManager.CancellationToken);
|
||||
Console.Write('>');
|
||||
ServerManager.GetEventHandler().AddEvent(E);
|
||||
await E.WaitAsync(Utilities.DefaultCommandTimeout, ServerManager.CancellationToken);
|
||||
Console.Write('>');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user