1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-20 20:20:28 -05:00

Refactor the ProfanityDetermentConfiguration class into ProfanityDetermentSettings

The class ProfanityDetermentConfiguration has been renamed to ProfanityDetermentSettings to better reflect its purpose. The unnecessary namespace declaration has been removed, along with the generation method that has been replaced with direct property initializations. Modifications have also been made to reflect these changes in the Plugin class.
This commit is contained in:
Ayymoss
2024-07-16 23:57:45 +01:00
parent 7fc2a600c6
commit c4defacabc
3 changed files with 43 additions and 54 deletions

View File

@ -0,0 +1,40 @@
using System.Collections.Generic;
using SharedLibraryCore;
namespace IW4MAdmin.Plugins.ProfanityDeterment;
public class ProfanityDetermentSettings
{
public List<string> OffensiveWords { get; set; } =
[
@"(ph|f)[a@]g[s\$]?",
@"(ph|f)[a@]gg[i1]ng",
@"(ph|f)[a@]gg?[o0][t\+][s\$]?",
@"(ph|f)[a@]gg[s\$]",
@"(ph|f)[e3][l1][l1]?[a@][t\+][i1][o0]",
@"(ph|f)u(c|k|ck|q)",
@"(ph|f)u(c|k|ck|q)[s\$]?",
@"(c|k|ck|q)un[t\+][l1][i1](c|k|ck|q)",
@"(c|k|ck|q)un[t\+][l1][i1](c|k|ck|q)[e3]r",
@"(c|k|ck|q)un[t\+][l1][i1](c|k|ck|q)[i1]ng",
@"b[i1][t\+]ch[s\$]?",
@"b[i1][t\+]ch[e3]r[s\$]?",
@"b[i1][t\+]ch[e3][s\$]",
@"b[i1][t\+]ch[i1]ng?",
@"n[i1]gg?[e3]r[s\$]?",
@"[s\$]h[i1][t\+][s\$]?",
@"[s\$][l1]u[t\+][s\$]?"
];
public bool EnableProfanityDeterment { get; set; } =
Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_PROFANITY_SETUP_ENABLE"].PromptBool();
public string ProfanityWarningMessage { get; set; } =
Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_PROFANITY_WARNMSG"];
public string ProfanityKickMessage { get; set; } =
Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_PROFANITY_KICKMSG"];
public int KickAfterInfringementCount { get; set; } = 2;
public bool KickOnInfringingName { get; set; } = true;
}