feature(parser): Option to override special localize character
This commit is contained in:
parent
16739ce455
commit
b311ecefc2
@ -29,6 +29,7 @@ namespace IW4MAdmin.Application.EventParsers
|
|||||||
Configuration = new DynamicEventParserConfiguration(parserRegexFactory)
|
Configuration = new DynamicEventParserConfiguration(parserRegexFactory)
|
||||||
{
|
{
|
||||||
GameDirectory = "main",
|
GameDirectory = "main",
|
||||||
|
LocalizeText = "\x15",
|
||||||
};
|
};
|
||||||
|
|
||||||
Configuration.Say.Pattern = @"^(say|sayteam);(-?[A-Fa-f0-9_]{1,32}|bot[0-9]+|0);([0-9]+);([^;]*);(.*)$";
|
Configuration.Say.Pattern = @"^(say|sayteam);(-?[A-Fa-f0-9_]{1,32}|bot[0-9]+|0);([0-9]+);([^;]*);(.*)$";
|
||||||
@ -185,7 +186,7 @@ namespace IW4MAdmin.Application.EventParsers
|
|||||||
if (matchResult.Success)
|
if (matchResult.Success)
|
||||||
{
|
{
|
||||||
var message = matchResult.Values[Configuration.Say.GroupMapping[ParserRegex.GroupType.Message]]
|
var message = matchResult.Values[Configuration.Say.GroupMapping[ParserRegex.GroupType.Message]]
|
||||||
.Replace("\x15", "")
|
.Replace(Configuration.LocalizeText, "")
|
||||||
.Trim();
|
.Trim();
|
||||||
|
|
||||||
if (message.Length > 0)
|
if (message.Length > 0)
|
||||||
|
@ -14,6 +14,7 @@ namespace IW4MAdmin.Application.EventParsers
|
|||||||
{
|
{
|
||||||
public string GameDirectory { get; set; }
|
public string GameDirectory { get; set; }
|
||||||
public ParserRegex Say { get; set; }
|
public ParserRegex Say { get; set; }
|
||||||
|
public string LocalizeText { get; set; }
|
||||||
public ParserRegex Join { get; set; }
|
public ParserRegex Join { get; set; }
|
||||||
public ParserRegex JoinTeam { get; set; }
|
public ParserRegex JoinTeam { get; set; }
|
||||||
public ParserRegex Quit { get; set; }
|
public ParserRegex Quit { get; set; }
|
||||||
|
@ -27,6 +27,7 @@ var plugin = {
|
|||||||
rconParser.Configuration.DefaultRConPort = 27016;
|
rconParser.Configuration.DefaultRConPort = 27016;
|
||||||
|
|
||||||
eventParser.Configuration.GameDirectory = '';
|
eventParser.Configuration.GameDirectory = '';
|
||||||
|
eventParser.Configuration.GameDirectory = '\x1F';
|
||||||
|
|
||||||
rconParser.Version = 'S1 MP 1.22 build 2195988 Wed Apr 18 11:26:14 2018 win64';
|
rconParser.Version = 'S1 MP 1.22 build 2195988 Wed Apr 18 11:26:14 2018 win64';
|
||||||
rconParser.GameName = 9; // SHG1
|
rconParser.GameName = 9; // SHG1
|
||||||
|
@ -16,6 +16,11 @@ namespace SharedLibraryCore.Interfaces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
ParserRegex Say { get; set; }
|
ParserRegex Say { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// stores the special ASCII value used by CoD games that prevents the text in the chat from being localized
|
||||||
|
/// </summary>
|
||||||
|
string LocalizeText { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// stores the regex information for a join event printed in the game log
|
/// stores the regex information for a join event printed in the game log
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user