<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using Terraria;
using TerrariaApi.Server;
using Timer = System.Timers.Timer;

namespace SummonLimit
{
	[ApiVersion(2, 00)]
	public partial class SummonLimit : TerrariaPlugin
	{
		public override string Name => "SummonLimit";
		public override string Description => "Prevents summon hacking.";
		public override string Author => "Newy";
		public override Version Version => Assembly.GetExecutingAssembly().GetName().Version;

		public SummonLimit(Main game) : base(game)
		{
		}

		internal static readonly Timer Metronome = new Timer(4000);

		// As of 1.3.4.4
		internal const ushort MaxSummons = 11;

		// A "dynamic" permission
		internal const string Permission = "summonlimit";

		internal const string KickMessage = "You've exceeded the amount of allowed summons.";

		public override void Initialize()
		{
			ServerApi.Hooks.GamePostInitialize.Register(this, OnPostInitialize);
		}

		protected override void Dispose(bool disposing)
		{
			ServerApi.Hooks.GamePostInitialize.Deregister(this, OnPostInitialize);
			base.Dispose(disposing);
		}

		private static void OnPostInitialize(EventArgs e)
		{
			Metronome.Elapsed += Check;
			Metronome.Start();
		}
	}
}<commit_msg>Less glory time for the haxers<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using Terraria;
using TerrariaApi.Server;
using Timer = System.Timers.Timer;

namespace SummonLimit
{
	[ApiVersion(2, 00)]
	public partial class SummonLimit : TerrariaPlugin
	{
		public override string Name => "SummonLimit";
		public override string Description => "Prevents summon hacking.";
		public override string Author => "Newy";
		public override Version Version => Assembly.GetExecutingAssembly().GetName().Version;

		public SummonLimit(Main game) : base(game)
		{
		}

		internal static readonly Timer Metronome = new Timer(3000);

		// As of 1.3.4.4
		internal const ushort MaxSummons = 11;

		// A "dynamic" permission
		internal const string Permission = "summonlimit";

		internal const string KickMessage = "You've exceeded the amount of allowed summons.";

		public override void Initialize()
		{
			ServerApi.Hooks.GamePostInitialize.Register(this, OnPostInitialize);
		}

		protected override void Dispose(bool disposing)
		{
			ServerApi.Hooks.GamePostInitialize.Deregister(this, OnPostInitialize);
			base.Dispose(disposing);
		}

		private static void OnPostInitialize(EventArgs e)
		{
			Metronome.Elapsed += Check;
			Metronome.Start();
		}
	}
}
{'fraction_non_alphanumeric': 0.09659714599341383, 'fraction_numerical': 0.00951335528723015, 'mean_word_length': 4.602459016393443, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3235677', 'n_tokens_mistral': 900, 'n_tokens_neox': 796, 'n_words': 229}