Add admin logs for connecting/disconnecting players (#42363)
* Initial commit * small tweak --------- Co-authored-by: ScarKy0 <scarky0@onet.eu>
This commit is contained in:
parent
399a86860d
commit
66ac4f1e42
|
|
@ -1,5 +1,6 @@
|
||||||
using Content.Shared.Administration;
|
using Content.Shared.Administration;
|
||||||
using Content.Shared.CCVar;
|
using Content.Shared.CCVar;
|
||||||
|
using Content.Shared.Database;
|
||||||
using Content.Shared.GameTicking;
|
using Content.Shared.GameTicking;
|
||||||
using Content.Shared.GameWindow;
|
using Content.Shared.GameWindow;
|
||||||
using Content.Shared.Players;
|
using Content.Shared.Players;
|
||||||
|
|
@ -92,6 +93,7 @@ namespace Content.Server.GameTicking
|
||||||
else
|
else
|
||||||
SpawnWaitDb();
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -118,6 +120,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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -130,6 +134,8 @@ namespace Content.Server.GameTicking
|
||||||
}
|
}
|
||||||
|
|
||||||
_userDb.ClientDisconnected(session);
|
_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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -482,6 +482,11 @@ public enum LogType
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Instrument = 103,
|
Instrument = 103,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Events related to players connecting/disconnecting.
|
||||||
|
/// </summary>
|
||||||
|
Connection = 104,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delta V - RMC Pose port
|
/// Delta V - RMC Pose port
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue