Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com> Co-authored-by: Jezithyr <jmaster9999@gmail.com> Co-authored-by: Jezithyr <Jezithyr@gmail.com> Co-authored-by: Visne <39844191+Visne@users.noreply.github.com> Co-authored-by: wrexbe <wrexbe@protonmail.com> Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com>
26 lines
896 B
C#
26 lines
896 B
C#
#nullable enable
|
|
using Content.Shared.Administration;
|
|
using JetBrains.Annotations;
|
|
using Robust.Shared.Network;
|
|
|
|
namespace Content.Client.Administration.Systems
|
|
{
|
|
[UsedImplicitly]
|
|
public sealed class BwoinkSystem : SharedBwoinkSystem
|
|
{
|
|
public event EventHandler<BwoinkTextMessage>? OnBwoinkTextMessageRecieved;
|
|
|
|
protected override void OnBwoinkTextMessage(BwoinkTextMessage message, EntitySessionEventArgs eventArgs)
|
|
{
|
|
OnBwoinkTextMessageRecieved?.Invoke(this, message);
|
|
}
|
|
|
|
public void Send(NetUserId channelId, string text)
|
|
{
|
|
// Reuse the channel ID as the 'true sender'.
|
|
// Server will ignore this and if someone makes it not ignore this (which is bad, allows impersonation!!!), that will help.
|
|
RaiseNetworkEvent(new BwoinkTextMessage(channelId, channelId, text));
|
|
}
|
|
}
|
|
}
|