From 7c3bf15809a39e275ce3290fb72710194eddab28 Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Sun, 29 May 2016 22:36:25 +0200 Subject: [PATCH] ban is pruning for 7 days, fixed .whoplays --- NadekoBot/Modules/Administration/AdministrationModule.cs | 4 ++-- NadekoBot/Modules/Administration/Commands/InfoCommands.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/NadekoBot/Modules/Administration/AdministrationModule.cs b/NadekoBot/Modules/Administration/AdministrationModule.cs index 5c69485f..f88c24b3 100644 --- a/NadekoBot/Modules/Administration/AdministrationModule.cs +++ b/NadekoBot/Modules/Administration/AdministrationModule.cs @@ -302,7 +302,7 @@ namespace NadekoBot.Modules.Administration } try { - await e.Server.Ban(usr).ConfigureAwait(false); + await e.Server.Ban(usr, 7).ConfigureAwait(false); await e.Channel.SendMessage("Banned user " + usr.Name + " Id: " + usr.Id).ConfigureAwait(false); } @@ -986,7 +986,7 @@ namespace NadekoBot.Modules.Administration if (string.IsNullOrWhiteSpace(game)) return; var en = e.Server.Users - .Where(u => u.CurrentGame?.Name.ToUpperInvariant() == game) + .Where(u => u.CurrentGame?.Name?.ToUpperInvariant() == game) .Select(u => $"{u.Name}"); var arr = en as string[] ?? en.ToArray(); diff --git a/NadekoBot/Modules/Administration/Commands/InfoCommands.cs b/NadekoBot/Modules/Administration/Commands/InfoCommands.cs index 94c1bf51..9d6770ea 100644 --- a/NadekoBot/Modules/Administration/Commands/InfoCommands.cs +++ b/NadekoBot/Modules/Administration/Commands/InfoCommands.cs @@ -86,7 +86,7 @@ namespace NadekoBot.Modules.Administration.Commands if (!string.IsNullOrWhiteSpace(user.Nickname)) sb.AppendLine($"`Nickname:` **{user.Nickname}**"); sb.AppendLine($"`Id:` **{user.Id}**"); - sb.AppendLine($"`Current Game:` **{(user.CurrentGame == null ? "-" : user.CurrentGame.Value.Name)}**"); + sb.AppendLine($"`Current Game:` **{(user.CurrentGame?.Name == null ? "-" : user.CurrentGame.Value.Name)}**"); if (user.LastOnlineAt != null) sb.AppendLine($"`Last Online:` **{user.LastOnlineAt:HH:mm:ss}**"); sb.AppendLine($"`Joined At:` **{user.JoinedAt}**");