Пример #1
0
        public override ILogEntry Parse(string line, LogEntry entry)
        {
            var chatMessageLogEntry = new ChatMessageLogEntry(entry)
            {
                Types = new[] { LogEntryType.ChatMessage, _type }
            };

            var parts = line.Split(": ", StringSplitOptions.RemoveEmptyEntries);

            chatMessageLogEntry.Player  = Regex.Replace(parts[0], "[#@%$]", "");
            chatMessageLogEntry.Message = parts[1..].Aggregate((total, value) => total + value);
Пример #2
0
 protected virtual void OnNewChatMessageLogEntry(ChatMessageLogEntry logEntry)
 {
     NewChatMessageLogEntry?.Invoke(logEntry);
 }