Decompiled source of cBoop v1.0.0

cBoop1.0.0.dll

Decompiled 3 days ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text.RegularExpressions;
using BepInEx;
using HarmonyLib;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("cBoop")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("cBoop")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c44a1f78-d5a4-4719-89f4-9c7d5aa02dd8")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace cBoop;

[BepInPlugin("cUtils.cBoop", "cBoop", "1.0.0")]
[BepInProcess("atlyss.exe")]
public class Plugin : BaseUnityPlugin
{
	[HarmonyPatch(typeof(ChatBehaviour), "Cmd_SendChatMessage")]
	public class Cmd_SendChatMessage_Patch
	{
		public static bool Prefix(ChatBehaviour __instance, ref string _message)
		{
			if (_message == null || !_message.StartsWith("/") || _message.StartsWith("//"))
			{
				return true;
			}
			string[] array = _message.Split(new char[1] { ' ' });
			string input = array[0].ToLower();
			input = Regex.Replace(input, "<.*?>", "");
			string text = input;
			string text2 = text;
			if (text2 == "/cboop")
			{
				CBoop(__instance);
				return false;
			}
			return true;
		}

		private static void CBoop(ChatBehaviour chat)
		{
			chat.Send_ChatMessage("/point");
			chat.Send_ChatMessage("*boop*");
		}
	}

	private const string PLUGIN_GUID = "cUtils.cBoop";

	private const string PLUGIN_NAME = "cBoop";

	private const string PLUGIN_VERSION = "1.0.0";

	private readonly Harmony harmony = new Harmony("cUtils.cBoop");

	private void Awake()
	{
		harmony.PatchAll();
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin cBoop is loaded!");
	}
}