Some updates
This commit is contained in:
@@ -39,17 +39,21 @@ using namespace ts::token;
|
||||
command_result ConnectedClient::handleCommandClientGetVariables(Command &cmd) {
|
||||
CMD_REQ_SERVER;
|
||||
ConnectedLockedClient client{this->server->find_client_by_id(cmd["clid"].as<ClientId>())};
|
||||
shared_lock tree_lock(this->channel_lock);
|
||||
{
|
||||
shared_lock tree_lock(this->channel_lock);
|
||||
|
||||
if (!client || (client.client != this && !this->isClientVisible(client.client, false)))
|
||||
return command_result{error::client_invalid_id, ""};
|
||||
if (!client || (client.client != this && !this->isClientVisible(client.client, false)))
|
||||
return command_result{error::client_invalid_id, ""};
|
||||
|
||||
deque<const property::PropertyDescription*> props;
|
||||
for (auto &prop : client->properties()->list_properties(property::FLAG_CLIENT_VARIABLE, this->getType() == CLIENT_TEAMSPEAK ? property::FLAG_NEW : (uint16_t) 0)) {
|
||||
props.push_back(&prop.type());
|
||||
deque<const property::PropertyDescription*> props;
|
||||
for (auto &prop : client->properties()->list_properties(property::FLAG_CLIENT_VARIABLE, this->getType() == CLIENT_TEAMSPEAK ? property::FLAG_NEW : (uint16_t) 0)) {
|
||||
props.push_back(&prop.type());
|
||||
}
|
||||
|
||||
this->notifyClientUpdated(client.client, props, false);
|
||||
}
|
||||
|
||||
this->notifyClientUpdated(client.client, props, false);
|
||||
if(client.client == this && this->getType() == ClientType::CLIENT_TEAMSPEAK)
|
||||
this->subscribeChannel({this->currentChannel}, true, true); /* lets show the clients in the current channel because we've not done that while joining (speed improvement ;))*/
|
||||
return command_result{error::ok};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user