[BUGFIX] "Ghost" in the lobby lets you see the whole chat (#33529)
* fix bug, in ghost command lobby * fix * Fix build
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using Content.Server.Popups;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.GameTicking;
|
||||
using Content.Shared.Mind;
|
||||
using Robust.Shared.Console;
|
||||
using Content.Server.GameTicking;
|
||||
|
||||
namespace Content.Server.Ghost
|
||||
{
|
||||
@@ -23,6 +25,14 @@ namespace Content.Server.Ghost
|
||||
return;
|
||||
}
|
||||
|
||||
var gameTicker = _entities.System<GameTicker>();
|
||||
if (!gameTicker.PlayerGameStatuses.TryGetValue(player.UserId, out var playerStatus) ||
|
||||
playerStatus is not PlayerGameStatus.JoinedGame)
|
||||
{
|
||||
shell.WriteLine("ghost-command-error-lobby");
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.AttachedEntity is { Valid: true } frozen &&
|
||||
_entities.HasComponent<AdminFrozenComponent>(frozen))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user