From 75920cad54f190fe12acf856a2a5361574f8eed6 Mon Sep 17 00:00:00 2001 From: Kwoth Date: Tue, 18 Oct 2016 03:26:41 +0200 Subject: [PATCH] logignore fixed? --- .../Modules/Administration/Commands/LogCommand.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 4d437938..5821de13 100644 --- a/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -519,9 +519,13 @@ namespace NadekoBot.Modules.Administration var config = uow.GuildConfigs.For(channel.Guild.Id); LogSetting logSetting = GuildLogSettings.GetOrAdd(channel.Guild.Id, (id) => config.LogSetting); removed = logSetting.IgnoredChannels.RemoveWhere(ilc => ilc.ChannelId == channel.Id); + config.LogSetting.IgnoredChannels.RemoveWhere(ilc => ilc.ChannelId == channel.Id); if (removed == 0) - logSetting.IgnoredChannels.Add(new IgnoredLogChannel { ChannelId = channel.Id }); - config.LogSetting = logSetting; + { + var toAdd = new IgnoredLogChannel { ChannelId = channel.Id }; + logSetting.IgnoredChannels.Add(toAdd); + config.LogSetting.IgnoredChannels.Add(toAdd); + } await uow.CompleteAsync().ConfigureAwait(false); }