mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 00:27:59 +00:00
* feat: added lslaws command * feat: add lswatchlisted command * tweak: nicer formatting for lswatchlisted * tweak: nicer formatting for lslaws * feat: lsobjectives lists everyone's objectives if no user specified * feat: mark ghosted players in players tab * docs: add missing DeltaV patch comment * feat: only alert admins if meatspiking player characters * feat: always alert about station explosions, don't spam off-station alerts * feat: stripping alert tweaks * feat: admin alert on low hour latejoin * refactor: forgot to make onspawncomplete non-async, wasn't necessary after all * feat: EORG alerts * feat: getping command * refactor: remove unused imports, format * refactor: early return in onspawncomplete * feat: add coordinate link to eorg destroy alert * tweak: cache watchlist data to avoid db calls, use in lswatchlisted * fix: null-check in OnNoteAdded * feat: watchlist indicator on admin overlay * feat: optionally mark watchlisted in f7 players * feat: refresh admin playerlist data on wl change * fix: update player list after cache write * feat: add tp links to prayer messages * tweak: don't alert when uncuffing self * tweak: lower uncuff other alert impact if mindshielded * docs: add deltav comments to imports * refactor: address review comments * style: deltav comments on same line as change * performance: get metadata only if objectives > 0 * fix: actually check user if explosion gridPos not on station * style: remove extraneous newlines * refactor: use fancy getOrNew method * feat: refresh player list UI if marking pref changed * feat: latejoin alert hours configurable * fix: also list objectives for non-humanoids and dead people
33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
using Content.Server.Administration;
|
|
using Content.Shared.Administration;
|
|
using Robust.Server.Player;
|
|
using Robust.Shared.Console;
|
|
|
|
namespace Content.Server._DV.Administration.Commands;
|
|
|
|
[AdminCommand(AdminFlags.Admin)]
|
|
public sealed class GetPingCommand : LocalizedEntityCommands
|
|
{
|
|
[Dependency] private readonly IPlayerManager _player = default!;
|
|
|
|
public override string Command => "getping";
|
|
|
|
public override void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
{
|
|
if (args.Length != 1 || !_player.TryGetSessionByUsername(args[0], out var session))
|
|
{
|
|
shell.WriteError(Loc.GetString("cmd-getping-err"));
|
|
return;
|
|
}
|
|
|
|
shell.WriteLine($"{session.Name}'s ping: {session.Ping}");
|
|
}
|
|
|
|
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
|
|
{
|
|
return args.Length == 1
|
|
? CompletionResult.FromHintOptions(CompletionHelper.SessionNames(), "username")
|
|
: CompletionResult.Empty;
|
|
}
|
|
}
|