logignore should work properly now
This commit is contained in:
parent
35fe0b3826
commit
8d3a722d18
@ -128,7 +128,8 @@ namespace NadekoBot.Modules.Administration
|
|||||||
LogSetting logSetting;
|
LogSetting logSetting;
|
||||||
if (!GuildLogSettings.TryGetValue(before.Guild.Id, out logSetting)
|
if (!GuildLogSettings.TryGetValue(before.Guild.Id, out logSetting)
|
||||||
|| !logSetting.IsLogging
|
|| !logSetting.IsLogging
|
||||||
|| !logSetting.ChannelUpdated)
|
|| !logSetting.ChannelUpdated
|
||||||
|
|| logSetting.IgnoredChannels.Any(ilc => ilc.ChannelId == after.Id))
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
ITextChannel logChannel;
|
ITextChannel logChannel;
|
||||||
@ -159,7 +160,8 @@ namespace NadekoBot.Modules.Administration
|
|||||||
LogSetting logSetting;
|
LogSetting logSetting;
|
||||||
if (!GuildLogSettings.TryGetValue(ch.Guild.Id, out logSetting)
|
if (!GuildLogSettings.TryGetValue(ch.Guild.Id, out logSetting)
|
||||||
|| !logSetting.IsLogging
|
|| !logSetting.IsLogging
|
||||||
|| !logSetting.ChannelDestroyed)
|
|| !logSetting.ChannelDestroyed
|
||||||
|
|| logSetting.IgnoredChannels.Any(ilc=>ilc.ChannelId == ch.Id))
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
ITextChannel logChannel;
|
ITextChannel logChannel;
|
||||||
@ -212,8 +214,7 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
LogSetting logSetting;
|
LogSetting logSetting;
|
||||||
if (!GuildLogSettings.TryGetValue(usr.Guild.Id, out logSetting)
|
if (!GuildLogSettings.TryGetValue(usr.Guild.Id, out logSetting)
|
||||||
|| !logSetting.LogVoicePresence
|
|| !logSetting.LogVoicePresence)
|
||||||
|| logSetting.IgnoredChannels.Any(ic => ic.ChannelId == after.VoiceChannel.Id))
|
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
ITextChannel logChannel;
|
ITextChannel logChannel;
|
||||||
@ -354,7 +355,8 @@ namespace NadekoBot.Modules.Administration
|
|||||||
LogSetting logSetting;
|
LogSetting logSetting;
|
||||||
if (!GuildLogSettings.TryGetValue(channel.Guild.Id, out logSetting)
|
if (!GuildLogSettings.TryGetValue(channel.Guild.Id, out logSetting)
|
||||||
|| !logSetting.IsLogging
|
|| !logSetting.IsLogging
|
||||||
|| !logSetting.MessageDeleted)
|
|| !logSetting.MessageDeleted
|
||||||
|
|| logSetting.IgnoredChannels.Any(ilc => ilc.ChannelId == channel.Id))
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
ITextChannel logChannel;
|
ITextChannel logChannel;
|
||||||
@ -390,7 +392,8 @@ namespace NadekoBot.Modules.Administration
|
|||||||
LogSetting logSetting;
|
LogSetting logSetting;
|
||||||
if (!GuildLogSettings.TryGetValue(channel.Guild.Id, out logSetting)
|
if (!GuildLogSettings.TryGetValue(channel.Guild.Id, out logSetting)
|
||||||
|| !logSetting.IsLogging
|
|| !logSetting.IsLogging
|
||||||
|| !logSetting.MessageUpdated)
|
|| !logSetting.MessageUpdated
|
||||||
|
|| logSetting.IgnoredChannels.Any(ilc => ilc.ChannelId == channel.Id))
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
|
|
||||||
ITextChannel logChannel;
|
ITextChannel logChannel;
|
||||||
@ -545,7 +548,6 @@ namespace NadekoBot.Modules.Administration
|
|||||||
|
|
||||||
// switch (eventName.ToLowerInvariant())
|
// switch (eventName.ToLowerInvariant())
|
||||||
// {
|
// {
|
||||||
// case "messagereceived":
|
|
||||||
// case "messageupdated":
|
// case "messageupdated":
|
||||||
// case "messagedeleted":
|
// case "messagedeleted":
|
||||||
// case "userjoined":
|
// case "userjoined":
|
||||||
|
Loading…
Reference in New Issue
Block a user