Code/SboxSuperuser/Components/CompatibilityProbe.Chat.cs

A partial component that implements IChatEvent to observe chat messages for an active compatibility probe. When the probe can run and is the active probe, it forwards the chat message to ProbeChat.Observe.

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 );
		}
	}
}