From 4e249533b0a7dce2dd3064733b1733c00db7038c Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Thu, 19 May 2016 19:51:33 +0200 Subject: [PATCH] log command no longer mentions --- NadekoBot/Classes/Extensions.cs | 2 ++ NadekoBot/Modules/Administration/Commands/LogCommand.cs | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NadekoBot/Classes/Extensions.cs b/NadekoBot/Classes/Extensions.cs index a38d55b1..9d0230e7 100644 --- a/NadekoBot/Classes/Extensions.cs +++ b/NadekoBot/Classes/Extensions.cs @@ -303,5 +303,7 @@ namespace NadekoBot.Extensions /// Merged bitmap public static async Task MergeAsync(this IEnumerable images, int reverseScaleFactor = 1) => await Task.Run(() => images.Merge(reverseScaleFactor)).ConfigureAwait(false); + + public static string Unmention(this string str) => str.Replace("@", "āļ¸"); } } diff --git a/NadekoBot/Modules/Administration/Commands/LogCommand.cs b/NadekoBot/Modules/Administration/Commands/LogCommand.cs index f18d247e..381f5511 100644 --- a/NadekoBot/Modules/Administration/Commands/LogCommand.cs +++ b/NadekoBot/Modules/Administration/Commands/LogCommand.cs @@ -168,7 +168,7 @@ namespace NadekoBot.Modules.Administration.Commands return; await ch.SendMessage( $@"🕔`{prettyCurrentTime}` **New Message** `#{e.Channel.Name}` -👤`{e.User?.ToString() ?? ("NULL")}` {e.Message.Text}").ConfigureAwait(false); +👤`{e.User?.ToString() ?? ("NULL")}` {e.Message.Text.Unmention()}").ConfigureAwait(false); } catch { } } @@ -183,7 +183,7 @@ $@"🕔`{prettyCurrentTime}` **New Message** `#{e.Channel.Name}` return; await ch.SendMessage( $@"🕔`{prettyCurrentTime}` **Message** 🚮 `#{e.Channel.Name}` -👤`{e.User?.ToString() ?? ("NULL")}` {e.Message.Text}").ConfigureAwait(false); +👤`{e.User?.ToString() ?? ("NULL")}` {e.Message.Text.Unmention()}").ConfigureAwait(false); } catch { } } @@ -199,8 +199,8 @@ $@"🕔`{prettyCurrentTime}` **Message** 🚮 `#{e.Channel.Name}` await ch.SendMessage( $@"🕔`{prettyCurrentTime}` **Message** 📝 `#{e.Channel.Name}` 👤`{e.User?.ToString() ?? ("NULL")}` - `Old:` {e.Before.Text} - `New:` {e.After.Text}").ConfigureAwait(false); + `Old:` {e.Before.Text.Unmention()} + `New:` {e.After.Text.Unmention()}").ConfigureAwait(false); } catch { } }