0.2.0: log kills, bomb plants and defuses as they happen; leave warmup out of match stats
This commit is contained in:
parent
905acd8f1d
commit
bba0471f20
5 changed files with 144 additions and 9 deletions
14
Database.cs
14
Database.cs
|
|
@ -155,6 +155,20 @@ public sealed class Database
|
|||
("@max", o.MaxPlayers), ("@map", Clip(o.Map, 64)));
|
||||
break;
|
||||
|
||||
case EventRecord o:
|
||||
await Exec(connection, transaction, token, """
|
||||
INSERT IGNORE INTO pt_events
|
||||
(event_key, server_id, session_key, steamid64, kind, at, map, team, weapon, headshot, noscope,
|
||||
thrusmoke, wallbang, blind, victim_steamid64, victim_bot, site)
|
||||
VALUES (@key, @server, @session, @steamid, @kind, @at, @map, @team, @weapon, @headshot, @noscope,
|
||||
@thrusmoke, @wallbang, @blind, @victim, @victimBot, @site)
|
||||
""", ("@key", o.EventKey), ("@server", o.ServerId), ("@session", o.SessionKey), ("@steamid", o.SteamId),
|
||||
("@kind", (int)o.Kind), ("@at", o.At), ("@map", Clip(o.Map, 64)), ("@team", o.Team),
|
||||
("@weapon", Clip(o.Weapon, 64)), ("@headshot", o.Headshot), ("@noscope", o.Noscope),
|
||||
("@thrusmoke", o.Thrusmoke), ("@wallbang", o.Wallbang), ("@blind", o.Blind),
|
||||
("@victim", o.VictimSteamId), ("@victimBot", o.VictimBot), ("@site", o.Site));
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new ArgumentException($"Unknown op {op.GetType().Name}");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue