mirror of
https://github.com/wega-team/ss14-wega.git
synced 2026-02-14 19:30:01 +01:00
Add admin logs for connecting/disconnecting players (#42363)
* Initial commit * small tweak --------- Co-authored-by: ScarKy0 <scarky0@onet.eu>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -478,4 +478,9 @@ public enum LogType
|
||||
/// Events relating to midi playback.
|
||||
/// </summary>
|
||||
Instrument = 103,
|
||||
|
||||
/// <summary>
|
||||
/// Events related to players connecting/disconnecting.
|
||||
/// </summary>
|
||||
Connection = 104,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user