Allow to unmute using guid
This commit is contained in:
parent
57d598617c
commit
7add84442f
@ -264,22 +264,27 @@ namespace Components
|
|||||||
const auto* cmd = params->get(0);
|
const auto* cmd = params->get(0);
|
||||||
if (params->length() < 2)
|
if (params->length() < 2)
|
||||||
{
|
{
|
||||||
Logger::Print("Usage: %s <client number>\n%s all = unmute everyone\n", cmd, cmd);
|
Logger::Print("Usage: %s <client number or guid>\n%s all = unmute everyone\n", cmd, cmd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto* client = Game::SV_GetPlayerByNum();
|
const auto* client = Game::SV_GetPlayerByNum();
|
||||||
if (client == nullptr)
|
|
||||||
|
if (client != nullptr)
|
||||||
{
|
{
|
||||||
|
Chat::UnmuteClient(client);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (params->get(1) == "all"s)
|
if (params->get(1) == "all"s)
|
||||||
{
|
{
|
||||||
Logger::Print("All players were unmuted\n");
|
Logger::Print("All players were unmuted\n");
|
||||||
Chat::MuteList.clear();
|
Chat::MuteList.clear();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Chat::UnmuteClient(client);
|
const auto SteamID = std::strtoull(params->get(1), nullptr, 16);
|
||||||
|
Chat::MuteList.erase(SteamID);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user