2020-04-01 15:11:56 -04:00
|
|
|
|
using IW4MAdmin.Application.Factories;
|
|
|
|
|
using SharedLibraryCore.Interfaces;
|
2019-01-26 21:33:37 -05:00
|
|
|
|
using SharedLibraryCore.RCon;
|
2020-01-15 19:43:52 -05:00
|
|
|
|
using System.Globalization;
|
2019-01-26 21:33:37 -05:00
|
|
|
|
|
|
|
|
|
namespace IW4MAdmin.Application.RconParsers
|
|
|
|
|
{
|
2019-02-02 20:40:37 -05:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// generic implementation of the IRConParserConfiguration
|
|
|
|
|
/// allows script plugins to generate dynamic RCon configurations
|
|
|
|
|
/// </summary>
|
2020-04-21 18:34:00 -04:00
|
|
|
|
public class DynamicRConParserConfiguration : IRConParserConfiguration
|
2019-01-26 21:33:37 -05:00
|
|
|
|
{
|
|
|
|
|
public CommandPrefix CommandPrefixes { get; set; }
|
2020-04-01 15:11:56 -04:00
|
|
|
|
public ParserRegex Status { get; set; }
|
|
|
|
|
public ParserRegex MapStatus { get; set; }
|
|
|
|
|
public ParserRegex Dvar { get; set; }
|
2020-04-17 16:05:16 -04:00
|
|
|
|
public ParserRegex StatusHeader { get; set; }
|
2020-01-13 17:51:16 -05:00
|
|
|
|
public string ServerNotRunningResponse { get; set; }
|
2019-02-03 21:47:05 -05:00
|
|
|
|
public bool WaitForResponse { get; set; } = true;
|
2020-01-15 19:43:52 -05:00
|
|
|
|
public NumberStyles GuidNumberStyle { get; set; } = NumberStyles.HexNumber;
|
2020-04-01 15:11:56 -04:00
|
|
|
|
|
|
|
|
|
public DynamicRConParserConfiguration(IParserRegexFactory parserRegexFactory)
|
|
|
|
|
{
|
|
|
|
|
Status = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
MapStatus = parserRegexFactory.CreateParserRegex();
|
|
|
|
|
Dvar = parserRegexFactory.CreateParserRegex();
|
2020-04-17 16:05:16 -04:00
|
|
|
|
StatusHeader = parserRegexFactory.CreateParserRegex();
|
2020-04-01 15:11:56 -04:00
|
|
|
|
}
|
2019-01-26 21:33:37 -05:00
|
|
|
|
}
|
|
|
|
|
}
|