From f2e8bb40e0ee955e3c08496e0ed8dbc8fa0b6bf5 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Mon, 1 May 2023 21:38:58 -0500 Subject: [PATCH] implement GameScriptEvent trigger --- Application/EventParsers/BaseEventParser.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Application/EventParsers/BaseEventParser.cs b/Application/EventParsers/BaseEventParser.cs index 6eade2c1..beceb7f3 100644 --- a/Application/EventParsers/BaseEventParser.cs +++ b/Application/EventParsers/BaseEventParser.cs @@ -141,7 +141,7 @@ namespace IW4MAdmin.Application.EventParsers if (timeMatch.Success) { - if (timeMatch.Values[0].Contains(":")) + if (timeMatch.Values[0].Contains(':')) { gameTime = timeMatch .Values @@ -180,6 +180,16 @@ namespace IW4MAdmin.Application.EventParsers case GameEvent.EventType.MapChange: return ParseMatchStartEvent(logLine, gameTime); } + + if (logLine.StartsWith("GSE;")) + { + return new GameScriptEvent + { + ScriptData = logLine, + GameTime = gameTime, + Source = GameEvent.EventSource.Log + }; + } if (eventKey is null || !_customEventRegistrations.ContainsKey(eventKey)) {