SboxSuperuser/Components/CompatibilityProbe.Chat.cs

A partial component class implementing IChatEvent that forwards chat messages to a compatibility probe. When the probe is allowed to run and is the active probe, it calls ProbeChat.Observe with the incoming chat message.

Networking
using Sandbox;
using SboxSuperuser.Engine.Compatibility;

namespace SboxSuperuser.Components;

public sealed partial class CompatibilityProbe : IChatEvent
{
	void IChatEvent.OnChatMessage( ChatMessageEvent message )
	{
		if ( CanRun && FindActiveProbe() == this )
		{
			ProbeChat.Observe( message );
		}
	}
}