Change kicking options

This commit is contained in:
sardelka9515
2022-08-22 09:33:54 +08:00
parent bf22c17bba
commit f1c7192029
5 changed files with 21 additions and 13 deletions

View File

@ -16,7 +16,7 @@ using System.Resources;
// Version informationr( // Version informationr(
[assembly: AssemblyVersion("1.5.2.63")] [assembly: AssemblyVersion("1.5.2.64")]
[assembly: AssemblyFileVersion("1.5.2.63")] [assembly: AssemblyFileVersion("1.5.2.64")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )] [assembly: NeutralResourcesLanguageAttribute( "en-US" )]

View File

@ -172,10 +172,15 @@ namespace RageCoop.Server
{ {
foreach(var c in ClientsByNetHandle.Values.ToArray()) foreach(var c in ClientsByNetHandle.Values.ToArray())
{ {
if (c.EntitiesCount > 100 || c.Player.IsInvincible) if (c.EntitiesCount > 100 && Settings.KickSpamming)
{ {
c.Kick("Bye bye asshole~"); c.Kick("Bye bye asshole: spamming");
API.SendChatMessage($"Asshole {c.Username} was kicked!"); API.SendChatMessage($"Asshole {c.Username} was kicked: Spamming");
}
else if (Settings.KickGodMode && c.Player.IsInvincible)
{
c.Kick("Bye bye asshole: godmode");
API.SendChatMessage($"Asshole {c.Username} was kicked: GodMode");
} }
} }
} }

View File

@ -166,10 +166,8 @@ namespace RageCoop.Server
{ {
_updateTimer.Enabled = true; _updateTimer.Enabled = true;
} }
if (Settings.AntiAssholes) _antiAssholesTimer.Enabled = true;
{
_antiAssholesTimer.Enabled = true;
}
Logger?.Info("Listening for clients"); Logger?.Info("Listening for clients");
} }

View File

@ -15,7 +15,7 @@ using System.Resources;
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
// Version information // Version information
[assembly: AssemblyVersion("1.5.2.77")] [assembly: AssemblyVersion("1.5.2.78")]
[assembly: AssemblyFileVersion("1.5.2.77")] [assembly: AssemblyFileVersion("1.5.2.78")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )] [assembly: NeutralResourcesLanguageAttribute( "en-US" )]

View File

@ -111,8 +111,13 @@
public bool AutoUpdate { get; set; } = false; public bool AutoUpdate { get; set; } = false;
/// <summary> /// <summary>
/// Kick godmode and spamming assholes /// Kick godmode assholes
/// </summary> /// </summary>
public bool AntiAssholes { get; set; } = true; public bool KickGodMode { get; set; } = false;
/// <summary>
/// Kick spamming assholes
/// </summary>
public bool KickSpamming { get; set; } = true;
} }
} }