Updates for 1.4.1
This commit is contained in:
@@ -576,7 +576,7 @@ CommandResult ConnectedClient::handleCommandServerEdit(Command &cmd) {
|
||||
if(target_server) {
|
||||
if (group_update)
|
||||
target_server->forEachClient([&](const shared_ptr<ConnectedClient>& client) {
|
||||
if(target_server->notifyClientPropertyUpdates(client, target_server->groups->update_server_group_property(client, true))) {
|
||||
if(target_server->notifyClientPropertyUpdates(client, target_server->groups->update_server_group_property(client, true, client->getChannel()))) {
|
||||
if(client->update_cached_permissions()) /* update cached calculated permissions */
|
||||
client->sendNeededPermissions(false); /* cached permissions had changed, notify the client */
|
||||
}
|
||||
@@ -1119,7 +1119,7 @@ CommandResult ConnectedClient::handleCommandChannelGroupDel(Command &cmd) {
|
||||
|
||||
if (group_manager->deleteGroup(channel_group) && this->server) {
|
||||
this->server->forEachClient([&](shared_ptr<ConnectedClient> cl) {
|
||||
if(this->server->notifyClientPropertyUpdates(cl, this->server->groups->update_server_group_property(cl, true))) {
|
||||
if(this->server->notifyClientPropertyUpdates(cl, this->server->groups->update_server_group_property(cl, true, cl->getChannel()))) {
|
||||
if(cl->update_cached_permissions()) /* update cached calculated permissions */
|
||||
cl->sendNeededPermissions(false); /* cached permissions had changed, notify the client */
|
||||
}
|
||||
@@ -2788,7 +2788,7 @@ CommandResult ConnectedClient::handleCommandServerGroupDel(Command &cmd) {
|
||||
if (group_manager->deleteGroup(serverGroup)) {
|
||||
if(this->server)
|
||||
this->server->forEachClient([&](shared_ptr<ConnectedClient> cl) {
|
||||
if(this->server->notifyClientPropertyUpdates(cl, this->server->groups->update_server_group_property(cl, true))) {
|
||||
if(this->server->notifyClientPropertyUpdates(cl, this->server->groups->update_server_group_property(cl, true, cl->getChannel()))) {
|
||||
if(cl->update_cached_permissions()) /* update cached calculated permissions */
|
||||
cl->sendNeededPermissions(false); /* cached permissions had changed, notify the client */
|
||||
}
|
||||
@@ -2926,7 +2926,7 @@ CommandResult ConnectedClient::handleCommandServerGroupAddClient(Command &cmd) {
|
||||
|
||||
for(const auto& _server : target_server ? std::deque<shared_ptr<TSServer>>{target_server} : serverInstance->getVoiceServerManager()->serverInstances()) {
|
||||
for (const auto &targetClient : _server->findClientsByCldbId(target_cldbid)) {
|
||||
if (_server->notifyClientPropertyUpdates(targetClient, _server->groups->update_server_group_property(targetClient, true))) {
|
||||
if (_server->notifyClientPropertyUpdates(targetClient, _server->groups->update_server_group_property(targetClient, true, targetClient->getChannel()))) {
|
||||
for (const auto &client : _server->getClients()) {
|
||||
if(client->isClientVisible(targetClient, true) || client == targetClient)
|
||||
for(const auto& group : applied_groups)
|
||||
@@ -3053,7 +3053,7 @@ CommandResult ConnectedClient::handleCommandServerGroupDelClient(Command &cmd) {
|
||||
|
||||
for(const auto& _server : target_server ? std::deque<shared_ptr<TSServer>>{target_server} : serverInstance->getVoiceServerManager()->serverInstances()) {
|
||||
for (const auto &targetClient : _server->findClientsByCldbId(target_cldbid)) {
|
||||
if (_server->notifyClientPropertyUpdates(targetClient, _server->groups->update_server_group_property(targetClient, true))) {
|
||||
if (_server->notifyClientPropertyUpdates(targetClient, _server->groups->update_server_group_property(targetClient, true, targetClient->getChannel()))) {
|
||||
for (const auto &client : _server->getClients()) {
|
||||
if(client->isClientVisible(targetClient, true) || client == targetClient)
|
||||
for(const auto& group : applied_groups)
|
||||
@@ -3470,7 +3470,7 @@ CommandResult ConnectedClient::handleCommandSetClientChannelGroup(Command &cmd)
|
||||
|
||||
for (const auto &targetClient : this->server->findClientsByCldbId(target_cldbid)) {
|
||||
unique_lock client_channel_lock_w(targetClient->channel_lock);
|
||||
auto updates = this->server->groups->update_server_group_property(targetClient, false); /* needs a write lock */
|
||||
auto updates = this->server->groups->update_server_group_property(targetClient, false, targetClient->getChannel()); /* needs a write lock */
|
||||
client_channel_lock_w.unlock();
|
||||
shared_lock client_channel_lock_r(targetClient->channel_lock);
|
||||
auto result = this->server->notifyClientPropertyUpdates(targetClient, updates);
|
||||
@@ -4504,7 +4504,7 @@ CommandResult ConnectedClient::handleCommandTokenUse(Command &cmd) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this->server->notifyClientPropertyUpdates(_this.lock(), this->server->groups->update_server_group_property(_this.lock(), true))) {
|
||||
if (this->server->notifyClientPropertyUpdates(_this.lock(), this->server->groups->update_server_group_property(_this.lock(), true, this->getChannel()))) {
|
||||
if(this->update_cached_permissions()) /* update cached calculated permissions */
|
||||
this->sendNeededPermissions(false); /* cached permissions had changed, notify the client */
|
||||
|
||||
@@ -6548,6 +6548,7 @@ CommandResult ConnectedClient::handleCommandMusicBotCreate(Command& cmd) {
|
||||
server_channel_w_lock
|
||||
);
|
||||
}
|
||||
bot->properties()[property::CLIENT_LAST_CHANNEL] = channel ? channel->channelId() : 0;
|
||||
|
||||
if(permissions[permission::i_client_music_delete_power] > 0) {
|
||||
bot->clientPermissions->set_permission(permission::i_client_music_needed_delete_power, {permissions[permission::i_client_music_delete_power],0}, permission::v2::set_value, permission::v2::do_nothing);
|
||||
|
||||
Reference in New Issue
Block a user