Playtime from PlaytimeHistory's database (SAW_PT_DSN)

A public Playtime tab and player-drawer playtime, and staff-only figures
(who's on, staff activity, disconnect reasons, countries, names, sessions)
for @css/generic on the staff panel and on the public site when signed in.
Hidden unless SAW_PT_DSN is set and its tables are there.
This commit is contained in:
Astra 2026-10-04 21:05:57 +01:00
parent daa7ec2dbc
commit 6d0fc6e463
18 changed files with 2238 additions and 12 deletions

View file

@ -245,6 +245,9 @@ func (s *Server) adminPlayer(w http.ResponseWriter, r *http.Request, id *Identit
} else if v != nil {
resp["verify"] = v
}
if pt := s.playerPlaytime(r, steamid, s.ptStaff(ctx, id)); pt != nil {
resp["playtime"] = pt
}
writeJSON(w, http.StatusOK, resp)
}