Fixed blacklist not working properly for guild owners

This commit is contained in:
Kwoth 2016-11-01 19:14:56 +01:00
parent c111f4c864
commit 371d21e785

View File

@ -110,16 +110,17 @@ namespace NadekoBot.Services
_log.Warn("I do not have permission to filter words in channel with id " + usrMsg.Channel.Id, ex); _log.Warn("I do not have permission to filter words in channel with id " + usrMsg.Channel.Id, ex);
} }
} }
BlacklistItem blacklistedItem;
if ((blacklistedItem = Permissions.BlacklistCommands.BlacklistedItems.FirstOrDefault(bi =>
(bi.Type == BlacklistItem.BlacklistType.Server && bi.ItemId == guild?.Id) ||
(bi.Type == BlacklistItem.BlacklistType.Channel && bi.ItemId == msg.Channel.Id) ||
(bi.Type == BlacklistItem.BlacklistType.User && bi.ItemId == usrMsg.Author.Id))) != null)
{
return;
}
} }
BlacklistItem blacklistedItem;
if ((blacklistedItem = Permissions.BlacklistCommands.BlacklistedItems.FirstOrDefault(bi =>
(bi.Type == BlacklistItem.BlacklistType.Server && bi.ItemId == guild?.Id) ||
(bi.Type == BlacklistItem.BlacklistType.Channel && bi.ItemId == msg.Channel.Id) ||
(bi.Type == BlacklistItem.BlacklistType.User && bi.ItemId == usrMsg.Author.Id))) != null)
{
return;
}
var throwaway = Task.Run(async () => var throwaway = Task.Run(async () =>
{ {
var sw = new Stopwatch(); var sw = new Stopwatch();