From 9f4e41778bbda972314a051bd2dfef03662613c3 Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 9 Aug 2020 18:11:31 +0200 Subject: [PATCH] =?UTF-8?q?recht=20und=20ordnung=20h=C3=A4lt=20wieder=201z?= =?UTF-8?q?ug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Commands/AdminCommands.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 1cc72d39..e7bb64e1 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; @@ -322,16 +322,16 @@ namespace ReallifeGamemode.Server.Commands [Command("o", "~m~Benutzung: ~s~/o [Nachricht]", GreedyArg = true)] public void CmdAdminO(Player player, string message) { - /* if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) - { - ChatService.NotAuthorized(player); - return; - } - */ + if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) + { + ChatService.NotAuthorized(player); + return; + } + message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); message = Regex.Replace(message, "#([0-9A-Fa-f]{6})", m => "!{" + m.Groups[0].Value + "}"); - string publicMessage = "~b~(( " + /*player.GetUser().AdminLevel.GetName() + */ " " + player.Name + ": " + message + " ~b~))"; + string publicMessage = "~b~(( " + player.GetUser().AdminLevel.GetName() + " " + player.Name + ": " + message + " ~b~))"; ChatService.Broadcast(publicMessage); }