mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-08 06:08:20 -05:00
fix issue with profanity plugin enabled check and add KickOnInfringingName setting
This commit is contained in:
parent
4aafaf1576
commit
d05bcde8e8
@ -32,7 +32,7 @@ public class Plugin : IPluginV2
|
||||
{
|
||||
_configuration = configuration;
|
||||
|
||||
if (_configuration?.EnableProfanityDeterment ?? false)
|
||||
if (!(_configuration?.EnableProfanityDeterment ?? false))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -97,7 +97,12 @@ public class Plugin : IPluginV2
|
||||
|
||||
private Task OnClientStateInitialized(ClientStateInitializeEvent clientEvent, CancellationToken token)
|
||||
{
|
||||
if (_configuration?.EnableProfanityDeterment ?? false)
|
||||
if (!(_configuration?.EnableProfanityDeterment ?? false))
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
if (!_configuration.KickOnInfringingName)
|
||||
{
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ namespace IW4MAdmin.Plugins.ProfanityDeterment
|
||||
public string ProfanityWarningMessage { get; set; }
|
||||
public string ProfanityKickMessage { get; set; }
|
||||
public int KickAfterInfringementCount { get; set; }
|
||||
public bool KickOnInfringingName { get; set; } = true;
|
||||
|
||||
public IBaseConfiguration Generate()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user