diff --git a/NadekoBot/Commands/LogCommand.cs b/NadekoBot/Commands/LogCommand.cs index 36713f30..d589f564 100644 --- a/NadekoBot/Commands/LogCommand.cs +++ b/NadekoBot/Commands/LogCommand.cs @@ -22,6 +22,7 @@ namespace NadekoBot.Commands { NadekoBot.Client.MessageDeleted += MsgDltd; NadekoBot.Client.MessageUpdated += MsgUpdtd; NadekoBot.Client.UserUpdated += UsrUpdtd; + NadekoBot.Client.UserBanned += UsrBanned; NadekoBot.Client.MessageReceived += async (s, e) => { @@ -41,6 +42,15 @@ namespace NadekoBot.Commands { }; } + private async void UsrBanned(object sender, UserEventArgs e) { + try { + Channel ch; + if (!logs.TryGetValue(e.Server, out ch)) + return; + await ch.SendMessage($"`User banned:` **{e.User.Name}** ({e.User.Id})"); + } catch { } + } + public Func DoFunc() => async e => { Channel ch; if (!logs.TryRemove(e.Server, out ch)) { diff --git a/NadekoBot/Commands/StreamNotifications.cs b/NadekoBot/Commands/StreamNotifications.cs index cec22aaa..cc58228b 100644 --- a/NadekoBot/Commands/StreamNotifications.cs +++ b/NadekoBot/Commands/StreamNotifications.cs @@ -154,7 +154,7 @@ namespace NadekoBot.Commands { private Func TrackStream(StreamNotificationConfig.StreamType type) => async e => { - var username = e.GetArg("username"); + var username = e.GetArg("username")?.ToLowerInvariant(); if (string.IsNullOrWhiteSpace(username)) return;