fixed an issue with ghost words in ;lfw

This commit is contained in:
Master Kwoth 2017-05-16 23:02:23 +02:00
parent f26fa4dfcc
commit cd7f2cd63d

View File

@ -190,7 +190,7 @@ namespace NadekoBot.Modules.Permissions
{ {
var config = uow.GuildConfigs.For(channel.Guild.Id, set => set.Include(gc => gc.FilteredWords)); var config = uow.GuildConfigs.For(channel.Guild.Id, set => set.Include(gc => gc.FilteredWords));
removed = config.FilteredWords.RemoveWhere(fw => fw.Word == word); removed = config.FilteredWords.RemoveWhere(fw => fw.Word.Trim().ToLowerInvariant() == word);
if (removed == 0) if (removed == 0)
config.FilteredWords.Add(new Services.Database.Models.FilteredWord() { Word = word }); config.FilteredWords.Add(new Services.Database.Models.FilteredWord() { Word = word });