2018-04-10 20:36:28 -04:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using SharedLibraryCore;
|
|
|
|
|
using SharedLibraryCore.Interfaces;
|
2018-03-29 00:40:57 -04:00
|
|
|
|
|
2018-04-10 20:36:28 -04:00
|
|
|
|
namespace IW4MAdmin.Plugins.ProfanityDeterment
|
2018-03-29 00:40:57 -04:00
|
|
|
|
{
|
|
|
|
|
class Configuration : IBaseConfiguration
|
|
|
|
|
{
|
|
|
|
|
public List<string> OffensiveWords { get; set; }
|
|
|
|
|
public bool EnableProfanityDeterment { get; set; }
|
|
|
|
|
public string ProfanityWarningMessage { get; set; }
|
|
|
|
|
public string ProfanityKickMessage { get; set; }
|
|
|
|
|
public int KickAfterInfringementCount { get; set; }
|
|
|
|
|
|
|
|
|
|
public IBaseConfiguration Generate()
|
|
|
|
|
{
|
|
|
|
|
OffensiveWords = new List<string>()
|
|
|
|
|
{
|
2018-09-23 20:45:54 -04:00
|
|
|
|
@"\s*n+.*i+.*g+.*e+.*r+\s*",
|
|
|
|
|
@"\s*n+.*i+.*g+.*a+\s*",
|
|
|
|
|
@"\s*f+u+.*c+.*k+.*\s*"
|
2018-03-29 00:40:57 -04:00
|
|
|
|
};
|
|
|
|
|
|
2018-05-08 00:58:46 -04:00
|
|
|
|
var loc = Utilities.CurrentLocalization.LocalizationIndex;
|
|
|
|
|
|
|
|
|
|
EnableProfanityDeterment = Utilities.PromptBool(loc["PLUGINS_PROFANITY_SETUP_ENABLE"]);
|
|
|
|
|
ProfanityWarningMessage = loc["PLUGINS_PROFANITY_WARNMSG"];
|
|
|
|
|
ProfanityKickMessage = loc["PLUGINS_PROFANITY_KICKMSG"];
|
2018-03-29 00:40:57 -04:00
|
|
|
|
KickAfterInfringementCount = 2;
|
|
|
|
|
|
|
|
|
|
return this;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Name() => "Configuration";
|
|
|
|
|
}
|
|
|
|
|
}
|