fix issue with profanity plugin enabled check and add KickOnInfringingName setting
This commit is contained in:
parent
6bb97c7d83
commit
388434133b
@ -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…
Reference in New Issue
Block a user