mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
have graph color generated by css so that MS Edge doesn't freak out when using rgba
don't do simple word check on offensive name
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using SharedLibraryCore;
|
||||
@ -31,19 +29,15 @@ namespace IW4MAdmin.Plugins.ProfanityDeterment
|
||||
E.Origin.SetAdditionalProperty("_profanityInfringements", 0);
|
||||
|
||||
var objectionalWords = Settings.Configuration().OffensiveWords;
|
||||
bool containsObjectionalWord = objectionalWords.FirstOrDefault(w => E.Origin.Name.ToLower().Contains(w)) != null;
|
||||
var matchedFilters = new List<string>();
|
||||
bool containsObjectionalWord = false;
|
||||
|
||||
// we want to run regex against it just incase
|
||||
if (!containsObjectionalWord)
|
||||
foreach (string word in objectionalWords)
|
||||
{
|
||||
foreach (string word in objectionalWords)
|
||||
if (Regex.IsMatch(E.Origin.Name.ToLower(), word, RegexOptions.IgnoreCase))
|
||||
{
|
||||
if (Regex.IsMatch(E.Origin.Name.ToLower(), word, RegexOptions.IgnoreCase))
|
||||
{
|
||||
containsObjectionalWord |= true;
|
||||
matchedFilters.Add(word);
|
||||
}
|
||||
containsObjectionalWord |= true;
|
||||
matchedFilters.Add(word);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user