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); }