From 9adb001d081e40250c3957a1f5039d3a3a625d6a Mon Sep 17 00:00:00 2001 From: m Date: Fri, 7 Feb 2025 14:53:10 -0600 Subject: [PATCH] better params check --- src/component/command.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/component/command.cpp b/src/component/command.cpp index c87f9f9..0c64fd7 100644 --- a/src/component/command.cpp +++ b/src/component/command.cpp @@ -74,14 +74,14 @@ namespace command void client_command_stub(const int client_num) { params_sv params = {}; - if (params.size() <= 1 || params[1] == "") + if (params.size() < 1) { client_command_hook.invoke(client_num); return; } const auto command = utils::string::to_lower(params[0]); - if ((command == "say" || command == "say_team") && + if (params.size() > 1 && (command == "say" || command == "say_team") && handle_chat_command(client_num, params)) { return;