Files
OldThink/Content.Server/UtkaIntegration/Commands/UtkaSendOOCMessage.cs
rhailrake aca6843c0a [feat] Sockets, i guess mm hmm
# 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
2024-01-10 22:21:52 +07:00

22 lines
691 B
C#

using System.Net;
using Content.Server.Chat.Managers;
using Content.Server.UtkaIntegration.TCP;
namespace Content.Server.UtkaIntegration;
public sealed class UtkaSendOOCMessage : IUtkaCommand
{
public string Name => "ooc";
public Type RequestMessageType => typeof(UtkaOOCRequest);
public void Execute(UtkaTCPSession session, UtkaBaseMessage baseMessage)
{
if (baseMessage is not UtkaOOCRequest message) return;
if(string.IsNullOrWhiteSpace(message.Message) || string.IsNullOrWhiteSpace(message.CKey)) return;
var chatSystem = IoCManager.Resolve<IChatManager>();
chatSystem.SendHookOOC($"{message.CKey}", $"{message.Message}");
}
}