diff --git a/src/Components/Modules/Bans.cpp b/src/Components/Modules/Bans.cpp index 21a7d880..8928494d 100644 --- a/src/Components/Modules/Bans.cpp +++ b/src/Components/Modules/Bans.cpp @@ -254,7 +254,6 @@ namespace Components } const auto num = std::atoi(input); - if (num < 0 || num >= *Game::svs_clientCount) { Logger::Print("Bad client slot: {}\n", num); @@ -268,8 +267,13 @@ namespace Components return; } + if (cl->bIsTestClient) + { + return; + } + const std::string reason = params->size() < 3 ? "EXE_ERR_BANNED_PERM" : params->join(2); - Bans::BanClient(&Game::svs_clients[num], reason); + BanClient(&Game::svs_clients[num], reason); }); Command::Add("unbanClient", [](Command::Params* params) diff --git a/src/Components/Modules/Chat.cpp b/src/Components/Modules/Chat.cpp index 5e056578..cff5b9d5 100644 --- a/src/Components/Modules/Chat.cpp +++ b/src/Components/Modules/Chat.cpp @@ -316,7 +316,7 @@ namespace Components } const auto* client = Game::SV_GetPlayerByNum(); - if (client != nullptr) + if (client && !client->bIsTestClient) { Voice::SV_MuteClient(client - Game::svs_clients); MuteClient(client); @@ -339,8 +339,12 @@ namespace Components } const auto* client = Game::SV_GetPlayerByNum(); + if (client->bIsTestClient) + { + return; + } - if (client != nullptr) + if (client) { UnmuteClient(client); Voice::SV_UnmuteClient(client - Game::svs_clients); diff --git a/src/Components/Modules/StructuredData.cpp b/src/Components/Modules/StructuredData.cpp index 6e0bec37..ce7546a7 100644 --- a/src/Components/Modules/StructuredData.cpp +++ b/src/Components/Modules/StructuredData.cpp @@ -160,6 +160,7 @@ namespace Components // 15 or more custom classes Utils::Hook::Set(0x60A2FE, NUM_CUSTOM_CLASSES); +#ifdef _DEBUG // Reset empty names Command::Add("checkClasses", [](Command::Params*) { @@ -170,7 +171,7 @@ namespace Components if (!*className) strcpy_s(className, 24, Game::SEH_StringEd_GetString(Utils::String::VA("CLASS_SLOT%i", i + 1))); } }); - +#endif return; }