# Conflicts: # Content.Server/Administration/Systems/BwoinkSystem.cs # Content.Server/Chat/Managers/ChatManager.cs # Content.Server/Entry/EntryPoint.cs # Content.Server/GameTicking/GameTicker.RoundFlow.cs # Content.Server/IoC/ServerContentIoC.cs # Content.Server/RoundEnd/RoundEndSystem.cs # Content.Server/Shuttles/Systems/EmergencyShuttleSystem.Console.cs # Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs # Content.Shared/CCVar/CCVars.cs
30 lines
831 B
C#
30 lines
831 B
C#
using System.Linq;
|
|
using System.Net;
|
|
using Content.Server.Administration.Managers;
|
|
using Content.Server.Chat.Managers;
|
|
using Content.Server.UtkaIntegration.TCP;
|
|
using Content.Shared.Chat;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Content.Server.UtkaIntegration;
|
|
|
|
public sealed class UtkaAssayCommand : IUtkaCommand
|
|
{
|
|
public string Name => "asay";
|
|
public Type RequestMessageType => typeof(UtkaAsayRequest);
|
|
|
|
public void Execute(UtkaTCPSession session, UtkaBaseMessage baseMessage)
|
|
{
|
|
if(baseMessage is not UtkaAsayRequest message) return;
|
|
|
|
var ckey = message.ACkey;
|
|
|
|
if(string.IsNullOrWhiteSpace(message.Message) || string.IsNullOrWhiteSpace(ckey)) return;
|
|
|
|
var chatManager = IoCManager.Resolve<IChatManager>();
|
|
|
|
chatManager.SendHookAdminChat(ckey, message.Message);
|
|
|
|
}
|
|
}
|