From ca3af417afb7c2520c46ac4d25ae756790556f27 Mon Sep 17 00:00:00 2001 From: hydrant Date: Tue, 1 Jun 2021 22:39:47 +0200 Subject: [PATCH] fix ban server crash --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 9f0dea32..1c1a6c33 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; @@ -959,6 +959,11 @@ namespace ReallifeGamemode.Server.Commands NAPI.Task.Run(() => { + if (!target.IsLoggedIn()) + { + return; + } + target.GetUser().BanPlayer(admin, reason, mins); }, 2500); }