From a4810308a1590114f210667ba6c18f2dd5660835 Mon Sep 17 00:00:00 2001 From: Midnight-Myth Date: Mon, 4 Jul 2016 13:57:51 +0200 Subject: [PATCH] Fixed userpresence and logserver --- .../Modules/Administration/Commands/LogCommand.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/NadekoBot/Modules/Administration/Commands/LogCommand.cs index 8eac1b93..8f51c9e5 100644 --- a/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -238,7 +238,7 @@ $@"🕔`{prettyCurrentTime}` **Message** 📝 `#{e.Channel.Name}` var config = SpecificConfigurations.Default.Of(e.Server.Id); try { - var chId = config.LogServerChannel; + var chId = config.LogPresenceChannel; if (chId != null) { Channel ch; @@ -365,6 +365,8 @@ $@"🕔`{prettyCurrentTime}` **Message** 📝 `#{e.Channel.Name}` Channel ch; if ((ch = e.Server.TextChannels.Where(tc => tc.Id == chId).FirstOrDefault()) == null) return; + + SpecificConfigurations.Default.Of (e.Server.Id).LogServerChannel = null; await e.Channel.SendMessage($"❗**NO LONGER LOGGING IN {ch.Mention} CHANNEL**❗").ConfigureAwait(false); }); @@ -373,14 +375,14 @@ $@"🕔`{prettyCurrentTime}` **Message** 📝 `#{e.Channel.Name}` .AddCheck(SimpleCheckers.ManageServer()) .Do(async e => { - var chId = SpecificConfigurations.Default.Of(e.Server.Id).LogServerChannel; + var chId = SpecificConfigurations.Default.Of(e.Server.Id).LogPresenceChannel; if (chId == null) { - SpecificConfigurations.Default.Of(e.Server.Id).LogServerChannel = e.Channel.Id; + SpecificConfigurations.Default.Of(e.Server.Id).LogPresenceChannel = e.Channel.Id; await e.Channel.SendMessage($"**User presence notifications enabled.**").ConfigureAwait(false); return; } - SpecificConfigurations.Default.Of(e.Server.Id).LogServerChannel = null; + SpecificConfigurations.Default.Of(e.Server.Id).LogPresenceChannel = null; await e.Channel.SendMessage($"**User presence notifications disabled.**").ConfigureAwait(false); });