2021-10-06 16:25:27 +01:00
|
|
|
using System;
|
2021-12-22 13:34:09 +01:00
|
|
|
using Content.Client.Administration;
|
2021-12-13 16:45:49 +11:00
|
|
|
using Content.Shared.Administration;
|
2021-10-06 16:25:27 +01:00
|
|
|
using Robust.Shared.Console;
|
|
|
|
|
using Robust.Shared.GameObjects;
|
2021-12-22 13:34:09 +01:00
|
|
|
using Robust.Shared.Network;
|
2021-10-06 16:25:27 +01:00
|
|
|
|
|
|
|
|
namespace Content.Client.Commands
|
|
|
|
|
{
|
2021-12-13 16:45:49 +11:00
|
|
|
[AnyCommand]
|
2021-10-06 16:25:27 +01:00
|
|
|
public class OpenAHelpCommand : IConsoleCommand
|
|
|
|
|
{
|
|
|
|
|
public string Command => "openahelp";
|
|
|
|
|
public string Description => $"Opens AHelp channel for a given NetUserID, or your personal channel if none given.";
|
|
|
|
|
public string Help => $"{Command} [<netuserid>]";
|
|
|
|
|
|
|
|
|
|
public void Execute(IConsoleShell shell, string argStr, string[] args)
|
|
|
|
|
{
|
|
|
|
|
if (args.Length >= 2)
|
|
|
|
|
{
|
|
|
|
|
shell.WriteLine(Help);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (args.Length == 0)
|
|
|
|
|
{
|
2022-01-04 21:12:34 +01:00
|
|
|
EntitySystem.Get<BwoinkSystem>().Open();
|
2021-10-06 16:25:27 +01:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (Guid.TryParse(args[0], out var guid))
|
|
|
|
|
{
|
2022-01-04 21:12:34 +01:00
|
|
|
EntitySystem.Get<BwoinkSystem>().Open(new NetUserId(guid));
|
2021-10-06 16:25:27 +01:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
shell.WriteLine("Bad GUID!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|