From 130960fa9720b476074490ca8cbca4793a3df5b3 Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 15 Jun 2021 11:04:15 +0200 Subject: [PATCH] quick reports togglebar? --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 13 +++++++++++++ ReallifeGamemode.Server/Report/Report.cs | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 532264f9..22377498 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -187,6 +187,19 @@ namespace ReallifeGamemode.Server.Commands switch (typ.ToLower()) { + case "qr": + if (player.HasData("togqr")) + { + player.ResetData("togqr"); + player.SendNotification("Quick Reports ~r~deaktiviert"); + } + else + { + player.SetData("togqr", true); + player.SendNotification("Quick Reports ~g~aktiviert"); + } + break; + case "ip": if (player.HasData("togip")) { diff --git a/ReallifeGamemode.Server/Report/Report.cs b/ReallifeGamemode.Server/Report/Report.cs index d8a5d9bf..37ad8766 100644 --- a/ReallifeGamemode.Server/Report/Report.cs +++ b/ReallifeGamemode.Server/Report/Report.cs @@ -215,7 +215,7 @@ namespace ReallifeGamemode.Server.Report } if (type == "Quick-Report") { - ChatService.BroadcastAdmin("!{#008fff}[QR]~w~ " + user.Name + " (" + user.Handle.Value + ")~w~: " + text, AdminLevel.SUPPORTER); + ChatService.BroadcastAdmin("!{#008fff}[QR]~w~ " + user.Name + " (" + user.Handle.Value + ")~w~: " + text, AdminLevel.SUPPORTER, shouldSendMessage: (admin) => admin.HasData("togqr")); user.SendChatMessage("~w~Dein Quick-Report wurde an das Adminteam weitergeleitet"); } }