From 371d21e785b0ba2127a1ebea445db40c8bf6f886 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 1 Nov 2016 19:14:56 +0100 Subject: [PATCH] Fixed blacklist not working properly for guild owners --- src/NadekoBot/Services/CommandHandler.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/NadekoBot/Services/CommandHandler.cs b/src/NadekoBot/Services/CommandHandler.cs index a70eabe4..1e7f2d15 100644 --- a/src/NadekoBot/Services/CommandHandler.cs +++ b/src/NadekoBot/Services/CommandHandler.cs @@ -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); } } - - 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 sw = new Stopwatch();