1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

Implement more dynamic parser stuff

This commit is contained in:
RaidMax
2019-01-27 16:40:08 -06:00
parent 88992d1a7b
commit ce7cf9f462
5 changed files with 153 additions and 45 deletions

View File

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace SharedLibraryCore.Interfaces
{
public sealed class ParserRegex
{
public enum GroupType
{
EventType,
OriginNetworkId,
TargetNetworkId,
OriginClientNumber,
TargetClientNumber,
OriginName,
TargetName,
OriginTeam,
TargetTeam,
Weapon,
Damage,
MeansOfDeath,
HitLocation,
Message,
RConClientNumber = 100,
RConScore = 101,
RConPing = 102,
RConNetworkId = 103,
RConName = 104,
RConIpAddress = 105,
AdditionalGroup = 200
}
public string Pattern { get; set; }
public Dictionary<GroupType, int> GroupMapping { get; private set; }
public ParserRegex()
{
GroupMapping = new Dictionary<GroupType, int>();
}
}
}

View File

@ -1,16 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace SharedLibraryCore.Interfaces
namespace SharedLibraryCore.Interfaces
{
public interface IEventParserConfiguration
{
string GameDirectory { get; set; }
string SayRegex { get; set; }
string JoinRegex { get; set; }
string QuitRegex { get; set; }
string KillRegex { get; set; }
string DamageRegex { get; set; }
ParserRegex Say { get; set; }
ParserRegex Join { get; set; }
ParserRegex Quit { get; set; }
ParserRegex Kill { get; set; }
ParserRegex Damage { get; set; }
}
}