From: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> Date: Sun, 11 Jan 2026 21:34:08 +0000 (+0100) Subject: Add admin logs for connecting/disconnecting players (#42363) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=9338834b1b8d21c78b4159bc3b9086919fcf9f6c;p=space-station-14.git Add admin logs for connecting/disconnecting players (#42363) * Initial commit * small tweak --------- Co-authored-by: ScarKy0 --- diff --git a/Content.Server/GameTicking/GameTicker.Player.cs b/Content.Server/GameTicking/GameTicker.Player.cs index 63821d9251..b5c9d790af 100644 --- a/Content.Server/GameTicking/GameTicker.Player.cs +++ b/Content.Server/GameTicking/GameTicker.Player.cs @@ -1,5 +1,6 @@ using Content.Shared.Administration; using Content.Shared.CCVar; +using Content.Shared.Database; using Content.Shared.GameTicking; using Content.Shared.GameWindow; using Content.Shared.Players; @@ -91,6 +92,7 @@ namespace Content.Server.GameTicking else SpawnWaitDb(); + _adminLogger.Add(LogType.Connection, LogImpact.Low, $"User {args.Session:Player} attached to {(args.Session.AttachedEntity != null ? ToPrettyString(args.Session.AttachedEntity) : "nothing"):entity} connected to the game."); break; } @@ -117,6 +119,8 @@ namespace Content.Server.GameTicking } } + _adminLogger.Add(LogType.Connection, LogImpact.Low, $"User {args.Session:Player} attached to {(args.Session.AttachedEntity != null ? ToPrettyString(args.Session.AttachedEntity) : "nothing"):entity} connected to the game."); + break; } @@ -129,6 +133,8 @@ namespace Content.Server.GameTicking } _userDb.ClientDisconnected(session); + + _adminLogger.Add(LogType.Connection, LogImpact.Low, $"User {args.Session:Player} attached to {(args.Session.AttachedEntity != null ? ToPrettyString(args.Session.AttachedEntity) : "nothing"):entity} disconnected from the game."); break; } } diff --git a/Content.Shared.Database/LogType.cs b/Content.Shared.Database/LogType.cs index d905cc03ae..c3687ec169 100644 --- a/Content.Shared.Database/LogType.cs +++ b/Content.Shared.Database/LogType.cs @@ -478,4 +478,9 @@ public enum LogType /// Events relating to midi playback. /// Instrument = 103, + + /// + /// Events related to players connecting/disconnecting. + /// + Connection = 104, }