Files
OldThink/Content.Client/Administration/Systems/BwoinkSystem.cs

26 lines
896 B
C#
Raw Normal View History

#nullable enable
using Content.Shared.Administration;
using JetBrains.Annotations;
2021-12-22 13:34:09 +01:00
using Robust.Shared.Network;
namespace Content.Client.Administration.Systems
{
[UsedImplicitly]
public sealed class BwoinkSystem : SharedBwoinkSystem
{
public event EventHandler<BwoinkTextMessage>? OnBwoinkTextMessageRecieved;
2022-09-14 20:42:35 -07:00
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));
}
}
}