GPCM: Report events for profile actions

This commit is contained in:
Palapeli
2026-04-05 09:52:28 -04:00
parent e30d89cd1e
commit 1c44f521f3
16 changed files with 119 additions and 37 deletions

View File

@@ -33,5 +33,7 @@ func Start(config common.Config) Connection {
}
func (c *Connection) Close() {
c.pool.Close()
if c != nil && c.pool != nil {
c.pool.Close()
}
}

View File

@@ -21,7 +21,7 @@ func (c *Connection) InsertEvent(eventType string, eventData map[string]any) (in
return eventId, nil
}
func (c *Connection) RegisterEventLogging(config common.Config, eventTypes []string) {
func (c *Connection) RegisterEvents(config common.Config, eventTypes []string) {
if !config.EventReporting.LogToDatabase {
return
}

View File

@@ -72,6 +72,7 @@ func (c *Connection) LoginUserToGPCM(userId uint64, gsbrcd string, profileId uin
}
logging.Notice("DATABASE", "Created new GPCM user:", aurora.Cyan(userId), aurora.Cyan(gsbrcd), aurora.Cyan(user.ProfileId))
user.Created = true
} else {
var firstName *string
var lastName *string

View File

@@ -38,6 +38,7 @@ type User struct {
OpenHost bool
LastInGameSn string
LastIPAddress string
Created bool
}
var (