mirror of
https://github.com/alicealys/t5-gsc-utils.git
synced 2025-04-19 20:42:54 +00:00
better params check
This commit is contained in:
parent
936c3a5548
commit
9adb001d08
@ -74,14 +74,14 @@ namespace command
|
|||||||
void client_command_stub(const int client_num)
|
void client_command_stub(const int client_num)
|
||||||
{
|
{
|
||||||
params_sv params = {};
|
params_sv params = {};
|
||||||
if (params.size() <= 1 || params[1] == "")
|
if (params.size() < 1)
|
||||||
{
|
{
|
||||||
client_command_hook.invoke<void>(client_num);
|
client_command_hook.invoke<void>(client_num);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto command = utils::string::to_lower(params[0]);
|
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))
|
handle_chat_command(client_num, params))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user