fix error

This commit is contained in:
hydrant
2019-05-26 17:47:35 +02:00
parent e616e6af1f
commit cc8544b76c
4 changed files with 14 additions and 10 deletions

View File

@@ -1,5 +1,6 @@
using GTANetworkAPI;
using ReallifeGamemode.Server.Models;
using ReallifeGamemode.Server.Services;
using ReallifeGamemode.Server.Util;
using System;
using System.Collections.Generic;
@@ -97,7 +98,7 @@ namespace ReallifeGamemode.Server.Entities
if (mins == 0)
{
NAPI.Chat.SendChatMessageToAll("!{#FF4040}[BAN] " + this.Name + " wurde von " + admin.Name + " permanent gebannt. [" + reason + "]");
ChatService.Broadcast("!{#FF4040}[BAN] " + this.Name + " wurde von " + admin.Name + " permanent gebannt. [" + reason + "]");
banUser = new Ban { UserId = this.Id, Reason = reason, BannedBy = admin.Name, Applied = unixTimestamp, UntilDateTime = unixTimestamp };
this.Client?.Kick();
@@ -106,7 +107,7 @@ namespace ReallifeGamemode.Server.Entities
}
else
{
NAPI.Chat.SendChatMessageToAll("!{#FF4040}[BAN] " + this.Name + " wurde von " + admin.Name + " für " + mins + " Minuten gebannt. [" + reason + "]");
ChatService.Broadcast("!{#FF4040}[BAN] " + this.Name + " wurde von " + admin.Name + " für " + mins + " Minuten gebannt. [" + reason + "]");
banUser = new Ban { UserId = this.Id, Reason = reason, BannedBy = admin.Name, Applied = unixTimestamp, UntilDateTime = unixTimestamp + mins * 60 };
this.Client?.Kick();
}