1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

support UTF8 in log files

sayteam registered as say event
updated readme
This commit is contained in:
RaidMax
2018-04-19 17:52:48 -05:00
parent 8e9d8e46c7
commit 75439e8c2a
11 changed files with 190 additions and 612 deletions

View File

@ -12,7 +12,7 @@ namespace Application.EventParsers
public GameEvent GetEvent(Server server, string logLine)
{
string[] lineSplit = logLine.Split(';');
string cleanedEventLine = Regex.Replace(lineSplit[0], @"[0-9]+:[0-9]+\ ", "");
string cleanedEventLine = Regex.Replace(lineSplit[0], @"[0-9]+:[0-9]+\ ", "").Trim();
if (cleanedEventLine[0] == 'K')
{
@ -29,7 +29,7 @@ namespace Application.EventParsers
}
}
if (lineSplit[0].Substring(lineSplit[0].Length - 3).Trim() == "say")
if (cleanedEventLine == "say" || cleanedEventLine == "sayteam")
{
return new GameEvent()
{
@ -37,7 +37,7 @@ namespace Application.EventParsers
Data = lineSplit[4].Replace("\x15", ""),
Origin = server.GetPlayersAsList().First(c => c.ClientNumber == Utilities.ClientIdFromString(lineSplit, 2)),
Owner = server,
Message = lineSplit[4]
Message = lineSplit[4].Replace("\x15", "")
};
}