IW4M-Admin/Plugins/ProfanityDeterment/Configuration.cs

37 lines
1.2 KiB
C#
Raw Normal View History

2018-04-10 20:36:28 -04:00
using System.Collections.Generic;
using SharedLibraryCore;
using SharedLibraryCore.Interfaces;
2018-04-10 20:36:28 -04:00
namespace IW4MAdmin.Plugins.ProfanityDeterment
{
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*"
};
var loc = Utilities.CurrentLocalization.LocalizationIndex;
EnableProfanityDeterment = Utilities.PromptBool(loc["PLUGINS_PROFANITY_SETUP_ENABLE"]);
ProfanityWarningMessage = loc["PLUGINS_PROFANITY_WARNMSG"];
ProfanityKickMessage = loc["PLUGINS_PROFANITY_KICKMSG"];
KickAfterInfringementCount = 2;
return this;
}
public string Name() => "Configuration";
}
}