ban is pruning for 7 days, fixed .whoplays

This commit is contained in:
Master Kwoth 2016-05-29 22:36:25 +02:00
parent ad358b5e0f
commit 7c3bf15809
2 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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}**");