mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-07-01 17:41:20 -05:00
Add server version to master api
Add IsEvadedOffense to EFPenalty Fix remote log reading in not Windows
This commit is contained in:
@ -106,16 +106,11 @@ namespace IW4MAdmin.Application.RconParsers
|
||||
ping = int.Parse(regex.Groups[3].Value);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
long networkId = regex.Groups[4].Value.ConvertLong();
|
||||
string name = regex.Groups[5].Value.StripColors().Trim();
|
||||
int ip = regex.Groups[7].Value.Split(':')[0].ConvertToIP();
|
||||
int? ip = regex.Groups[7].Value.Split(':')[0].ConvertToIP();
|
||||
|
||||
var P = new EFClient()
|
||||
var client = new EFClient()
|
||||
{
|
||||
CurrentAlias = new EFAlias()
|
||||
{
|
||||
@ -123,13 +118,19 @@ namespace IW4MAdmin.Application.RconParsers
|
||||
},
|
||||
NetworkId = networkId,
|
||||
ClientNumber = clientNumber,
|
||||
IPAddress = ip == 0 ? int.MinValue : ip,
|
||||
IPAddress = ip,
|
||||
Ping = ping,
|
||||
Score = score,
|
||||
IsBot = ip == 0,
|
||||
IsBot = ip == null,
|
||||
State = EFClient.ClientState.Connecting
|
||||
};
|
||||
StatusPlayers.Add(P);
|
||||
StatusPlayers.Add(client);
|
||||
|
||||
// they've not fully connected yet
|
||||
if (!client.IsBot && ping == 999)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ namespace IW4MAdmin.Application.RconParsers
|
||||
long networkId = 0;//playerInfo[4].ConvertLong();
|
||||
int.TryParse(playerInfo[0], out clientId);
|
||||
var regex = Regex.Match(responseLine, @"\d+\.\d+\.\d+.\d+\:\d{1,5}");
|
||||
int ipAddress = regex.Value.Split(':')[0].ConvertToIP();
|
||||
int? ipAddress = regex.Value.Split(':')[0].ConvertToIP();
|
||||
regex = Regex.Match(responseLine, @" +(\d+ +){3}");
|
||||
int score = Int32.Parse(regex.Value.Split(' ', StringSplitOptions.RemoveEmptyEntries)[0]);
|
||||
|
||||
|
@ -97,7 +97,7 @@ namespace IW4MAdmin.Application.RconParsers
|
||||
#if DEBUG
|
||||
Ping = 1;
|
||||
#endif
|
||||
int ipAddress = regex.Value.Split(':')[0].ConvertToIP();
|
||||
int? ipAddress = regex.Value.Split(':')[0].ConvertToIP();
|
||||
regex = Regex.Match(responseLine, @"[0-9]{1,2}\s+[0-9]+\s+");
|
||||
var p = new EFClient()
|
||||
{
|
||||
@ -108,7 +108,7 @@ namespace IW4MAdmin.Application.RconParsers
|
||||
Ping = Ping,
|
||||
Score = 0,
|
||||
State = EFClient.ClientState.Connecting,
|
||||
IsBot = networkId == 0
|
||||
IsBot = ipAddress == null
|
||||
};
|
||||
|
||||
if (p.IsBot)
|
||||
|
Reference in New Issue
Block a user