Add new Radix UI components and associated dependencies in package-lock.json
This commit is contained in:
@@ -7,10 +7,14 @@ import (
|
||||
)
|
||||
|
||||
type LogEvent struct {
|
||||
Timestamp time.Time
|
||||
Type string // 'CHAT', 'JOIN', 'LEAVE', 'ADMIN', 'GENERIC'
|
||||
Content string
|
||||
Raw string
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
Type string `json:"type"` // 'CHAT', 'JOIN', 'LEAVE', 'ADMIN', 'GENERIC'
|
||||
Content string `json:"content"`
|
||||
PlayerName string `json:"playerName,omitempty"`
|
||||
PlayerNameHash string `json:"playerNameHash,omitempty"`
|
||||
ServerID string `json:"serverId,omitempty"`
|
||||
ServerName string `json:"serverName,omitempty"`
|
||||
Raw string `json:"raw,omitempty"`
|
||||
}
|
||||
|
||||
// Reforger-specific regex patterns
|
||||
@@ -37,6 +41,7 @@ func ParseLine(line string) *LogEvent {
|
||||
// Try Chat
|
||||
if matches := chatRegex.FindStringSubmatch(line); matches != nil {
|
||||
event.Type = "CHAT"
|
||||
event.PlayerName = matches[2]
|
||||
event.Content = matches[2] + ": " + matches[3]
|
||||
return event
|
||||
}
|
||||
@@ -44,6 +49,7 @@ func ParseLine(line string) *LogEvent {
|
||||
// Try Join
|
||||
if matches := joinRegex.FindStringSubmatch(line); matches != nil {
|
||||
event.Type = "JOIN"
|
||||
event.PlayerName = matches[2]
|
||||
event.Content = matches[2] + " connected to server"
|
||||
return event
|
||||
}
|
||||
@@ -51,6 +57,7 @@ func ParseLine(line string) *LogEvent {
|
||||
// Try Leave
|
||||
if matches := leaveRegex.FindStringSubmatch(line); matches != nil {
|
||||
event.Type = "LEAVE"
|
||||
event.PlayerName = matches[2]
|
||||
event.Content = matches[2] + " left the server"
|
||||
return event
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user