fml... ignore case on piracy checks

This commit is contained in:
13xforever 2018-07-23 12:56:34 +05:00 committed by Roberto Anić Banić
parent b2e0416e58
commit 6c48a76005
2 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ namespace CompatBot.Database.Providers
private static void RebuildMatcher()
{
matcher = PiracyStrings.Count == 0 ? null : new AhoCorasickDoubleArrayTrie<string>(PiracyStrings.ToDictionary(s => s, s => s));
matcher = PiracyStrings.Count == 0 ? null : new AhoCorasickDoubleArrayTrie<string>(PiracyStrings.ToDictionary(s => s, s => s), true);
}
}
}

View File

@ -20,7 +20,7 @@ namespace CompatBot.EventHandlers
// see http://www.psdevwiki.com/ps3/Productcode
private static readonly Regex ProductCode = new Regex(@"(?<letters>(?:[BPSUVX][CL]|P[ETU]|NP)[AEHJKPUIX][ABSM])[ \-]?(?<numbers>\d{5})", RegexOptions.Compiled | RegexOptions.IgnoreCase);
private static readonly Client compatClient = new Client();
private static readonly AhoCorasickDoubleArrayTrie<string> ChillCheck = new AhoCorasickDoubleArrayTrie<string>(new[] {"shut up", "hush", "chill"}.ToDictionary(s => s, s => s));
private static readonly AhoCorasickDoubleArrayTrie<string> ChillCheck = new AhoCorasickDoubleArrayTrie<string>(new[] {"shut up", "hush", "chill"}.ToDictionary(s => s, s => s), true);
public static async Task OnMessageMention(MessageCreateEventArgs args)
{