Decompiled source of AeroltHostOnly v1.0.0

AeroltHostOnly.dll

Decompiled 2 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using HG.Reflection;
using Microsoft.CodeAnalysis;
using On.RoR2.Networking;
using R2API.Utils;
using RoR2.Networking;
using UnityEngine.Networking;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: OptIn]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("AeroltHostOnly")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+6d7044d0c8d1cc0da63c1eacd3b028ad498f73bb")]
[assembly: AssemblyProduct("AeroltHostOnly")]
[assembly: AssemblyTitle("AeroltHostOnly")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace AeroltHostOnly
{
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("Def.AeroltHostOnly", "AeroltHostOnly", "1.0.0")]
	[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
	public class AeroltHostOnly : BaseUnityPlugin
	{
		public const string PluginGUID = "Def.AeroltHostOnly";

		public const string PluginAuthor = "Def";

		public const string PluginName = "AeroltHostOnly";

		public const string PluginVersion = "1.0.0";

		public static PluginInfo PInfo { get; private set; }

		public void Awake()
		{
			PInfo = ((BaseUnityPlugin)this).Info;
		}

		private void OnEnable()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			NetworkManagerSystem.OnStartServer += new hook_OnStartServer(NetworkManagerSystem_OnStartServer);
		}

		private void OnDisable()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0011: Expected O, but got Unknown
			NetworkManagerSystem.OnStartServer -= new hook_OnStartServer(NetworkManagerSystem_OnStartServer);
		}

		private void NetworkManagerSystem_OnStartServer(orig_OnStartServer orig, NetworkManagerSystem self)
		{
			orig.Invoke(self);
			NetworkServer.UnregisterHandler((short)2004);
		}
	}
}