Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Announcements v1.0.0
ANN.dll
Decompiled 6 hours agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using HarmonyLib; using Photon.Pun; using Photon.Realtime; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyCompany("ANN")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ANN")] [assembly: AssemblyTitle("ANN")] [assembly: AssemblyVersion("1.0.0.0")] namespace ANN; internal class Data { internal const string Name = "Announcements"; internal const string GUID = "com.coolchair.announcements"; internal const string Version = "1.0.0"; } [BepInPlugin("com.coolchair.announcements", "Announcements", "1.0.0")] internal class Loader : BaseUnityPlugin { private void Awake() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) ((BaseUnityPlugin)this).Logger.LogMessage((object)"Loading"); new Harmony("com.coolchair.announcements").PatchAll(); ((BaseUnityPlugin)this).Logger.LogMessage((object)"Loaded!"); } } [HarmonyPatch(typeof(ChatManager))] internal class ChatManagerPatch { [HarmonyPatch("MessageSend")] [HarmonyPrefix] private static bool MessageSend_Prefix(ChatManager __instance, ref string ___chatMessage) { string[] array = ___chatMessage.Replace("<b>|</b>", string.Empty).ToLower().Split(new char[1] { ' ' }); string text = array[0]; string text2 = text; if (text2 == "!pub" && array.Length >= 2) { string text3 = ___chatMessage.Replace("<b>|</b>", string.Empty).Substring(5); Player[] playerList = PhotonNetwork.PlayerList; foreach (Player val in playerList) { PlayerAvatar val2; try { val2 = SemiFunc.PlayerAvatarGetFromPhotonPlayer(val); } catch { continue; } if (!((Object)(object)val2 == (Object)null)) { val2.photonView.RPC("ChatMessageSendRPC", val, new object[2] { text3, false }); } } return false; } return true; } }