From b47d04c404e2613373933ce0c58d5b2f3c0409e6 Mon Sep 17 00:00:00 2001 From: MSWS Date: Thu, 5 Sep 2024 21:59:09 -0700 Subject: [PATCH] Disable gang command in prod --- Commands/GangCommand.cs | 6 ++++++ GangsTest/Startup.cs | 1 + 2 files changed, 7 insertions(+) diff --git a/Commands/GangCommand.cs b/Commands/GangCommand.cs index cda5b9b..41fb77c 100644 --- a/Commands/GangCommand.cs +++ b/Commands/GangCommand.cs @@ -1,4 +1,5 @@ using Commands.gang; +using CounterStrikeSharp.API.Modules.Utils; using GangsAPI.Data; using GangsAPI.Data.Command; using GangsAPI.Services; @@ -31,6 +32,11 @@ public async Task Execute(PlayerWrapper? executor, throw new InvalidOperationException( $"Attempted to execute GangCommand with invalid name: {info[0]}"); + if (executor?.Player != null) { + info.ReplySync( + $" {ChatColors.DarkRed}GANGS {ChatColors.White}> {ChatColors.Grey}SoonTM!"); + return CommandResult.SUCCESS; + } if (info.ArgCount == 1) return CommandResult.INVALID_ARGS; diff --git a/GangsTest/Startup.cs b/GangsTest/Startup.cs index 782009d..86167b3 100644 --- a/GangsTest/Startup.cs +++ b/GangsTest/Startup.cs @@ -1,5 +1,6 @@ using GangsAPI.Services; using GangsAPI.Services.Commands; +using MartinCostello.Logging.XUnit; using Microsoft.Extensions.DependencyInjection; using Mock;