From 1f69afca34d3fc4ed1881ea0ed285d465ee1d041 Mon Sep 17 00:00:00 2001 From: Fabian Fabian Date: Sat, 7 Sep 2019 20:38:28 +0200 Subject: [PATCH] more --- .../Commands/AdminCommands.cs | 24 ++++--------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 20a79134..a04dad50 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -363,34 +363,20 @@ namespace ReallifeGamemode.Server.Commands return; } - int timer = int.Parse(timer_string); - - foreach (Client c in NAPI.Pools.GetAllPlayers()) - { - c.TriggerEvent("countdown", timer, text); - } - } - public void CmdCountdown(Client player, string text) - { - if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) - { - ChatService.NotAuthorized(player); - return; - } - - if (text == "clear") + if (timer_string == "clear") { foreach (Client c in NAPI.Pools.GetAllPlayers()) { c.TriggerEvent("countdown", 0, "ich liebe balbo"); } + return; } - int timer = int.Parse(text); - + int timer = int.Parse(timer_string); + foreach (Client c in NAPI.Pools.GetAllPlayers()) { - c.TriggerEvent("countdown", timer, ""); + c.TriggerEvent("countdown", timer, text); } }