Decompiled source of BetterJoinLeave v1.1.1

GDWeave/mods/BetterJoinLeaveColors/BetterJoinLeaveColors.dll

Decompiled 3 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Text.Json.Serialization;
using GDWeave;
using GDWeave.Godot;
using GDWeave.Godot.Variants;
using GDWeave.Modding;
using Serilog;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(/*Could not decode attribute arguments.*/)]
[assembly: TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
[assembly: AssemblyCompany("BetterJoinLeaveColors")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0+e481377bd77b0dd8d2faf88deaccf1dd8f364011")]
[assembly: AssemblyProduct("BetterJoinLeaveColors")]
[assembly: AssemblyTitle("BetterJoinLeaveColors")]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
namespace BetterJoinLeaveColors;

public class Config
{
	[JsonInclude]
	public string joinPrefix = "[color=#00C203]";

	[JsonInclude]
	public string joinSuffix = " :Joined[/color]";

	[JsonInclude]
	public string LeavePrefix = "[color=#FFBB00]";

	[JsonInclude]
	public string LeaveSuffix = " :Left[/color]";

	[JsonInclude]
	public string KickPrefix = "[color=#FF0000]";

	[JsonInclude]
	public string KickSuffix = " was KICKED[/color]";

	[JsonInclude]
	public string BanPrefix = "[color=#820000]";

	[JsonInclude]
	public string BanSuffix = " was BANNED[/color]";
}
public class Join_Leave_Patch : IScriptMod
{
	[CompilerGenerated]
	private sealed class <Modify>d__1 : global::System.Collections.Generic.IEnumerable<Token>, global::System.Collections.IEnumerable, global::System.Collections.Generic.IEnumerator<Token>, global::System.Collections.IEnumerator, global::System.IDisposable
	{
		private int <>1__state;

		private Token <>2__current;

		private int <>l__initialThreadId;

		private global::System.Collections.Generic.IEnumerable<Token> tokens;

		public global::System.Collections.Generic.IEnumerable<Token> <>3__tokens;

		public Join_Leave_Patch <>4__this;

		private MultiTokenWaiter <joinMsg>5__2;

		private MultiTokenWaiter <leaveMsg>5__3;

		private TokenConsumer <joinMsgConsumer>5__4;

		private TokenConsumer <leaveMsgConsumer>5__5;

		private global::System.Collections.Generic.IEnumerator<Token> <>7__wrap5;

		private Enumerator<Token> <>7__wrap6;

		Token global::System.Collections.Generic.IEnumerator<Token>.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		object global::System.Collections.IEnumerator.Current
		{
			[DebuggerHidden]
			get
			{
				return <>2__current;
			}
		}

		[DebuggerHidden]
		public <Modify>d__1(int <>1__state)
		{
			this.<>1__state = <>1__state;
			<>l__initialThreadId = Environment.CurrentManagedThreadId;
		}

		[DebuggerHidden]
		void global::System.IDisposable.Dispose()
		{
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			int num = <>1__state;
			if ((uint)(num - -6) <= 3u || (uint)(num - 1) <= 41u)
			{
				try
				{
					switch (num)
					{
					case -4:
					case 34:
						try
						{
						}
						finally
						{
							<>m__Finally2();
						}
						break;
					case -5:
					case 35:
						try
						{
						}
						finally
						{
							<>m__Finally3();
						}
						break;
					case -6:
					case 36:
						try
						{
						}
						finally
						{
							<>m__Finally4();
						}
						break;
					}
				}
				finally
				{
					<>m__Finally1();
				}
			}
			<joinMsg>5__2 = null;
			<leaveMsg>5__3 = null;
			<joinMsgConsumer>5__4 = null;
			<leaveMsgConsumer>5__5 = null;
			<>7__wrap5 = null;
			<>7__wrap6 = default(Enumerator<Token>);
			<>1__state = -2;
		}

		private bool MoveNext()
		{
			//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02c3: Expected O, but got Unknown
			//IL_02e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_02f0: Expected O, but got Unknown
			//IL_030c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0316: Expected O, but got Unknown
			//IL_0339: Unknown result type (might be due to invalid IL or missing references)
			//IL_0343: Expected O, but got Unknown
			//IL_035f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0369: Expected O, but got Unknown
			//IL_038c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0396: Expected O, but got Unknown
			//IL_03b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_03bc: Expected O, but got Unknown
			//IL_03df: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e9: Expected O, but got Unknown
			//IL_0409: Unknown result type (might be due to invalid IL or missing references)
			//IL_0413: Expected O, but got Unknown
			//IL_0430: Unknown result type (might be due to invalid IL or missing references)
			//IL_043a: Expected O, but got Unknown
			//IL_045e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0468: Expected O, but got Unknown
			//IL_048f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0499: Expected O, but got Unknown
			//IL_0494: Unknown result type (might be due to invalid IL or missing references)
			//IL_049e: Expected O, but got Unknown
			//IL_04c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_04cc: Expected O, but got Unknown
			//IL_04e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_04f3: Expected O, but got Unknown
			//IL_0517: Unknown result type (might be due to invalid IL or missing references)
			//IL_0521: Expected O, but got Unknown
			//IL_0548: Unknown result type (might be due to invalid IL or missing references)
			//IL_0552: Expected O, but got Unknown
			//IL_054d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0557: Expected O, but got Unknown
			//IL_057b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0585: Expected O, but got Unknown
			//IL_059e: Unknown result type (might be due to invalid IL or missing references)
			//IL_05a8: Expected O, but got Unknown
			//IL_05a3: Unknown result type (might be due to invalid IL or missing references)
			//IL_05ad: Expected O, but got Unknown
			//IL_05d1: Unknown result type (might be due to invalid IL or missing references)
			//IL_05db: Expected O, but got Unknown
			//IL_0668: Unknown result type (might be due to invalid IL or missing references)
			//IL_0672: Expected O, but got Unknown
			//IL_0696: Unknown result type (might be due to invalid IL or missing references)
			//IL_06a0: Expected O, but got Unknown
			//IL_06bd: Unknown result type (might be due to invalid IL or missing references)
			//IL_06c7: Expected O, but got Unknown
			//IL_06eb: Unknown result type (might be due to invalid IL or missing references)
			//IL_06f5: Expected O, but got Unknown
			//IL_0712: Unknown result type (might be due to invalid IL or missing references)
			//IL_071c: Expected O, but got Unknown
			//IL_0740: Unknown result type (might be due to invalid IL or missing references)
			//IL_074a: Expected O, but got Unknown
			//IL_0767: Unknown result type (might be due to invalid IL or missing references)
			//IL_0771: Expected O, but got Unknown
			//IL_0795: Unknown result type (might be due to invalid IL or missing references)
			//IL_079f: Expected O, but got Unknown
			//IL_07bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_07c9: Expected O, but got Unknown
			//IL_07e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_07f0: Expected O, but got Unknown
			//IL_0814: Unknown result type (might be due to invalid IL or missing references)
			//IL_081e: Expected O, but got Unknown
			//IL_083b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0845: Expected O, but got Unknown
			//IL_0886: Unknown result type (might be due to invalid IL or missing references)
			//IL_088b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a27: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a31: Expected O, but got Unknown
			//IL_0a2c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a36: Expected O, but got Unknown
			//IL_0a5a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a64: Expected O, but got Unknown
			//IL_0a84: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a8e: Expected O, but got Unknown
			//IL_08df: Unknown result type (might be due to invalid IL or missing references)
			//IL_090f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0914: Unknown result type (might be due to invalid IL or missing references)
			//IL_0968: Unknown result type (might be due to invalid IL or missing references)
			//IL_0998: Unknown result type (might be due to invalid IL or missing references)
			//IL_099d: Unknown result type (might be due to invalid IL or missing references)
			//IL_09f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a04: Unknown result type (might be due to invalid IL or missing references)
			//IL_0a0e: Expected O, but got Unknown
			//IL_015f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Expected O, but got Unknown
			//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Expected O, but got Unknown
			//IL_0224: Unknown result type (might be due to invalid IL or missing references)
			//IL_022e: Expected O, but got Unknown
			//IL_024e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0258: Expected O, but got Unknown
			try
			{
				int num = <>1__state;
				Join_Leave_Patch join_Leave_Patch = <>4__this;
				switch (num)
				{
				default:
					return false;
				case 0:
					<>1__state = -1;
					<joinMsg>5__2 = new MultiTokenWaiter(new Func<Token, bool>[4]
					{
						delegate(Token t)
						{
							IdentifierToken val5 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							return val5 != null && val5.Name == "_connect_to_lobby_member";
						},
						(Token t) => (int)t.Type == 80,
						delegate(Token t)
						{
							IdentifierToken val4 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							return val4 != null && val4.Name == "steam_id";
						},
						(Token t) => (int)t.Type == 81
					}, false, false);
					<leaveMsg>5__3 = new MultiTokenWaiter(new Func<Token, bool>[4]
					{
						delegate(Token t)
						{
							IdentifierToken val3 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							return val3 != null && val3.Name == "_close_session";
						},
						(Token t) => (int)t.Type == 80,
						delegate(Token t)
						{
							IdentifierToken val2 = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
							return val2 != null && val2.Name == "steam_id";
						},
						(Token t) => (int)t.Type == 81
					}, false, false);
					<joinMsgConsumer>5__4 = new TokenConsumer((Func<Token, bool>)((Token t) => (int)t.Type == 81));
					<leaveMsgConsumer>5__5 = new TokenConsumer((Func<Token, bool>)delegate(Token t)
					{
						IdentifierToken val = (IdentifierToken)(object)((t is IdentifierToken) ? t : null);
						return val != null && val.Name == "_send_weblobby";
					});
					<>7__wrap5 = tokens.GetEnumerator();
					<>1__state = -3;
					break;
				case 1:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)1u);
					<>1__state = 2;
					return true;
				case 2:
					<>1__state = -3;
					<>2__current = new Token((TokenType)59, (uint?)null);
					<>1__state = 3;
					return true;
				case 3:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("username");
					<>1__state = 4;
					return true;
				case 4:
					<>1__state = -3;
					<>2__current = new Token((TokenType)23, (uint?)null);
					<>1__state = 5;
					return true;
				case 5:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("_get_username_from_id");
					<>1__state = 6;
					return true;
				case 6:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 7;
					return true;
				case 7:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("steam_id");
					<>1__state = 8;
					return true;
				case 8:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 9;
					return true;
				case 9:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)1u);
					<>1__state = 10;
					return true;
				case 10:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("_update_chat");
					<>1__state = 11;
					return true;
				case 11:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 12;
					return true;
				case 12:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new StringVariant(Mod.Instance.Config.joinPrefix));
					<>1__state = 13;
					return true;
				case 13:
					<>1__state = -3;
					<>2__current = new Token((TokenType)16, (uint?)null);
					<>1__state = 14;
					return true;
				case 14:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("username");
					<>1__state = 15;
					return true;
				case 15:
					<>1__state = -3;
					<>2__current = new Token((TokenType)16, (uint?)null);
					<>1__state = 16;
					return true;
				case 16:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new StringVariant(Mod.Instance.Config.joinSuffix));
					<>1__state = 17;
					return true;
				case 17:
					<>1__state = -3;
					<>2__current = new Token((TokenType)82, (uint?)null);
					<>1__state = 18;
					return true;
				case 18:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new BoolVariant(false));
					<>1__state = 19;
					return true;
				case 19:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 20;
					return true;
				case 20:
					<>1__state = -3;
					<joinMsgConsumer>5__4.SetReady();
					break;
				case 21:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)1u);
					<>1__state = 22;
					return true;
				case 22:
					<>1__state = -3;
					<>2__current = new Token((TokenType)59, (uint?)null);
					<>1__state = 23;
					return true;
				case 23:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("username");
					<>1__state = 24;
					return true;
				case 24:
					<>1__state = -3;
					<>2__current = new Token((TokenType)23, (uint?)null);
					<>1__state = 25;
					return true;
				case 25:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("_get_username_from_id");
					<>1__state = 26;
					return true;
				case 26:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 27;
					return true;
				case 27:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("steam_id");
					<>1__state = 28;
					return true;
				case 28:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 29;
					return true;
				case 29:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)1u);
					<>1__state = 30;
					return true;
				case 30:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("_update_chat");
					<>1__state = 31;
					return true;
				case 31:
					<>1__state = -3;
					<>2__current = new Token((TokenType)80, (uint?)null);
					<>1__state = 32;
					return true;
				case 32:
					<>1__state = -3;
					<>2__current = (Token)new IdentifierToken("text");
					<>1__state = 33;
					return true;
				case 33:
					<>1__state = -3;
					<>7__wrap6 = join_Leave_Patch.SetupLeaveStuff("%u left the game.", Mod.Instance.Config.LeavePrefix, Mod.Instance.Config.LeaveSuffix).GetEnumerator();
					<>1__state = -4;
					goto IL_08c6;
				case 34:
					<>1__state = -4;
					goto IL_08c6;
				case 35:
					<>1__state = -5;
					goto IL_094f;
				case 36:
					<>1__state = -6;
					goto IL_09d8;
				case 37:
					<>1__state = -3;
					<>2__current = (Token)new ConstantToken((Variant)new BoolVariant(false));
					<>1__state = 38;
					return true;
				case 38:
					<>1__state = -3;
					<>2__current = new Token((TokenType)81, (uint?)null);
					<>1__state = 39;
					return true;
				case 39:
					<>1__state = -3;
					<>2__current = new Token((TokenType)89, (uint?)1u);
					<>1__state = 40;
					return true;
				case 40:
					<>1__state = -3;
					<leaveMsgConsumer>5__5.SetReady();
					break;
				case 41:
					<>1__state = -3;
					<leaveMsgConsumer>5__5.Reset();
					break;
				case 42:
					{
						<>1__state = -3;
						break;
					}
					IL_08c6:
					if (<>7__wrap6.MoveNext())
					{
						Token current = <>7__wrap6.Current;
						<>2__current = current;
						<>1__state = 34;
						return true;
					}
					<>m__Finally2();
					<>7__wrap6 = default(Enumerator<Token>);
					<>7__wrap6 = join_Leave_Patch.SetupLeaveStuff("%u was kicked from the game.", Mod.Instance.Config.KickPrefix, Mod.Instance.Config.KickSuffix).GetEnumerator();
					<>1__state = -5;
					goto IL_094f;
					IL_094f:
					if (<>7__wrap6.MoveNext())
					{
						Token current2 = <>7__wrap6.Current;
						<>2__current = current2;
						<>1__state = 35;
						return true;
					}
					<>m__Finally3();
					<>7__wrap6 = default(Enumerator<Token>);
					<>7__wrap6 = join_Leave_Patch.SetupLeaveStuff("%u was banned from the game.", Mod.Instance.Config.BanPrefix, Mod.Instance.Config.BanSuffix).GetEnumerator();
					<>1__state = -6;
					goto IL_09d8;
					IL_09d8:
					if (<>7__wrap6.MoveNext())
					{
						Token current3 = <>7__wrap6.Current;
						<>2__current = current3;
						<>1__state = 36;
						return true;
					}
					<>m__Finally4();
					<>7__wrap6 = default(Enumerator<Token>);
					<>2__current = new Token((TokenType)82, (uint?)null);
					<>1__state = 37;
					return true;
				}
				while (((global::System.Collections.IEnumerator)<>7__wrap5).MoveNext())
				{
					Token current4 = <>7__wrap5.Current;
					if (<joinMsg>5__2.Check(current4))
					{
						<>2__current = current4;
						<>1__state = 1;
						return true;
					}
					if (<joinMsgConsumer>5__4.Ready)
					{
						if (!<joinMsgConsumer>5__4.Check(current4))
						{
							<joinMsgConsumer>5__4.Reset();
						}
						continue;
					}
					if (<leaveMsg>5__3.Check(current4))
					{
						<>2__current = current4;
						<>1__state = 21;
						return true;
					}
					if (<leaveMsgConsumer>5__5.Ready)
					{
						if (<leaveMsgConsumer>5__5.Check(current4))
						{
							continue;
						}
						<>2__current = current4;
						<>1__state = 41;
						return true;
					}
					<>2__current = current4;
					<>1__state = 42;
					return true;
				}
				<>m__Finally1();
				<>7__wrap5 = null;
				return false;
			}
			catch
			{
				//try-fault
				((global::System.IDisposable)this).Dispose();
				throw;
			}
		}

		bool global::System.Collections.IEnumerator.MoveNext()
		{
			//ILSpy generated this explicit interface implementation from .override directive in MoveNext
			return this.MoveNext();
		}

		private void <>m__Finally1()
		{
			<>1__state = -1;
			if (<>7__wrap5 != null)
			{
				((global::System.IDisposable)<>7__wrap5).Dispose();
			}
		}

		private void <>m__Finally2()
		{
			<>1__state = -3;
			((global::System.IDisposable)<>7__wrap6).Dispose();
		}

		private void <>m__Finally3()
		{
			<>1__state = -3;
			((global::System.IDisposable)<>7__wrap6).Dispose();
		}

		private void <>m__Finally4()
		{
			<>1__state = -3;
			((global::System.IDisposable)<>7__wrap6).Dispose();
		}

		[DebuggerHidden]
		void global::System.Collections.IEnumerator.Reset()
		{
			//IL_0000: Unknown result type (might be due to invalid IL or missing references)
			throw new NotSupportedException();
		}

		[DebuggerHidden]
		global::System.Collections.Generic.IEnumerator<Token> global::System.Collections.Generic.IEnumerable<Token>.GetEnumerator()
		{
			<Modify>d__1 <Modify>d__;
			if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId)
			{
				<>1__state = 0;
				<Modify>d__ = this;
			}
			else
			{
				<Modify>d__ = new <Modify>d__1(0)
				{
					<>4__this = <>4__this
				};
			}
			<Modify>d__.tokens = <>3__tokens;
			return <Modify>d__;
		}

		[DebuggerHidden]
		global::System.Collections.IEnumerator global::System.Collections.IEnumerable.GetEnumerator()
		{
			return (global::System.Collections.IEnumerator)((global::System.Collections.Generic.IEnumerable<Token>)this).GetEnumerator();
		}
	}

	public bool ShouldRun(string path)
	{
		return path == "res://Scenes/Singletons/SteamNetwork.gdc";
	}

	[IteratorStateMachine(typeof(<Modify>d__1))]
	public global::System.Collections.Generic.IEnumerable<Token> Modify(string path, global::System.Collections.Generic.IEnumerable<Token> tokens)
	{
		//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
		return new <Modify>d__1(-2)
		{
			<>4__this = this,
			<>3__tokens = tokens
		};
	}

	private List<Token> SetupLeaveStuff(string strToReplace, string prefix, string suffix)
	{
		//IL_002c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0032: Expected O, but got Unknown
		//IL_0043: Unknown result type (might be due to invalid IL or missing references)
		//IL_0049: Expected O, but got Unknown
		//IL_0060: Unknown result type (might be due to invalid IL or missing references)
		//IL_0066: Expected O, but got Unknown
		//IL_0073: Unknown result type (might be due to invalid IL or missing references)
		//IL_007d: Expected O, but got Unknown
		//IL_0078: Unknown result type (might be due to invalid IL or missing references)
		//IL_007e: Expected O, but got Unknown
		//IL_0095: Unknown result type (might be due to invalid IL or missing references)
		//IL_009b: Expected O, but got Unknown
		//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b2: Expected O, but got Unknown
		//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
		//IL_00b3: Expected O, but got Unknown
		//IL_00ca: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d0: Expected O, but got Unknown
		//IL_00e1: Unknown result type (might be due to invalid IL or missing references)
		//IL_00e7: Expected O, but got Unknown
		//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
		//IL_0104: Expected O, but got Unknown
		//IL_0111: Unknown result type (might be due to invalid IL or missing references)
		//IL_011b: Expected O, but got Unknown
		//IL_0116: Unknown result type (might be due to invalid IL or missing references)
		//IL_011c: Expected O, but got Unknown
		//IL_0133: Unknown result type (might be due to invalid IL or missing references)
		//IL_0139: Expected O, but got Unknown
		int num = 11;
		List<Token> obj = new List<Token>(num);
		CollectionsMarshal.SetCount<Token>(obj, num);
		global::System.Span<Token> span = CollectionsMarshal.AsSpan<Token>(obj);
		int num2 = 0;
		span[num2] = new Token((TokenType)84, (uint?)null);
		num2++;
		span[num2] = (Token)new IdentifierToken("replace");
		num2++;
		span[num2] = new Token((TokenType)80, (uint?)null);
		num2++;
		span[num2] = (Token)new ConstantToken((Variant)new StringVariant(strToReplace));
		num2++;
		span[num2] = new Token((TokenType)82, (uint?)null);
		num2++;
		span[num2] = (Token)new ConstantToken((Variant)new StringVariant(prefix));
		num2++;
		span[num2] = new Token((TokenType)16, (uint?)null);
		num2++;
		span[num2] = (Token)new IdentifierToken("username");
		num2++;
		span[num2] = new Token((TokenType)16, (uint?)null);
		num2++;
		span[num2] = (Token)new ConstantToken((Variant)new StringVariant(suffix));
		num2++;
		span[num2] = new Token((TokenType)81, (uint?)null);
		return obj;
	}
}
public class Mod : IMod, global::System.IDisposable
{
	public static Mod Instance;

	public Config Config;

	public ILogger Logger;

	public Mod(IModInterface modInterface)
	{
		Config = modInterface.ReadConfig<Config>();
		modInterface.RegisterScriptMod((IScriptMod)(object)new Join_Leave_Patch());
		Instance = this;
		Logger = modInterface.Logger;
	}

	public void Dispose()
	{
	}
}