# 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
22 lines
691 B
C#
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}");
|
|
}
|
|
}
|