update index for ratings/prune old entries

small stat tweaks to add players on first kill/damage event
(instead of on connect which causes issues with slow writes)
This commit is contained in:
RaidMax
2020-11-14 18:24:51 -06:00
parent 664eb32587
commit a574fb0d4b
10 changed files with 999 additions and 7 deletions

View File

@ -138,7 +138,7 @@ namespace IW4MAdmin.Application.RconParsers
public virtual async Task<(List<EFClient>, string, string)> GetStatusAsync(IRConConnection connection)
{
string[] response = await connection.SendQueryAsync(StaticHelpers.QueryType.COMMAND_STATUS);
_logger.LogDebug("Status Response {@response}", (object)response);
_logger.LogDebug("Status Response {response}", string.Join(Environment.NewLine, response));
return (ClientsFromStatus(response), MapFromStatus(response), GameTypeFromStatus(response));
}
@ -205,6 +205,12 @@ namespace IW4MAdmin.Application.RconParsers
if (match.Success)
{
if (match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConPing]] == "ZMBI")
{
_logger.LogDebug("Ignoring detected client {client} because they are zombie state", string.Join(",", match.Values));
continue;
}
int clientNumber = int.Parse(match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConClientNumber]]);
int score = int.Parse(match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConScore]]);