bugfixes, track playerId (directplay id, unique per session)

This commit is contained in:
2023-04-29 08:08:04 -07:00
parent 811ccdf3b7
commit edd1c3a82b
8 changed files with 37 additions and 14 deletions

View File

@@ -143,6 +143,7 @@ type AttendanceLogItem struct {
MissionStart string `json:"missionStart"`
// situational
EventType string `json:"eventType"`
PlayerId string `json:"playerId"`
PlayerUID string `json:"playerUID"`
ProfileName string `json:"profileName"`
SteamName string `json:"steamName"`
@@ -180,7 +181,7 @@ func writeAttendance(data string) {
// send to DB
result, err := db.ExecContext(context.Background(), `INSERT INTO AttendanceLog (timestamp, mission_name, briefing_name, mission_name_source, on_load_name, author, server_name, server_profile, mission_start, event_type, player_uid, profile_name, steam_name, is_jip, role_description) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)`,
result, err := db.ExecContext(context.Background(), `INSERT INTO AttendanceLog (timestamp, mission_name, briefing_name, mission_name_source, on_load_name, author, server_name, server_profile, mission_start, event_type, player_id, player_uid, profile_name, steam_name, is_jip, role_description) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)`,
now,
event.MissionName,
event.BriefingName,
@@ -191,6 +192,7 @@ func writeAttendance(data string) {
event.ServerProfile,
t,
event.EventType,
event.PlayerId,
event.PlayerUID,
event.ProfileName,
event.SteamName,