Some minor changes
This commit is contained in:
parent
c21838d4f6
commit
4c7a70bc81
@ -272,13 +272,19 @@ command_result ConnectedClient::handleCommandClientMove(Command &cmd) {
|
||||
}
|
||||
|
||||
for(const auto& oldChannel : channels) {
|
||||
if(!server_channel_w_lock.owns_lock())
|
||||
if(!server_channel_w_lock.owns_lock()) {
|
||||
server_channel_w_lock.lock();
|
||||
if(oldChannel->channelType() == ChannelType::temporary && oldChannel->properties()[property::CHANNEL_DELETE_DELAY].as<int64_t>() == 0)
|
||||
if(this->server->getClientsByChannelRoot(oldChannel, false).empty())
|
||||
}
|
||||
|
||||
if(oldChannel->channelType() == ChannelType::temporary && oldChannel->properties()[property::CHANNEL_DELETE_DELAY].as<int64_t>() == 0) {
|
||||
if(this->server->getClientsByChannelRoot(oldChannel, false).empty()) {
|
||||
this->server->delete_channel(dynamic_pointer_cast<ServerChannel>(oldChannel), this->ref(), "temporary auto delete", server_channel_w_lock, true);
|
||||
if(server_channel_w_lock.owns_lock())
|
||||
}
|
||||
}
|
||||
|
||||
if(server_channel_w_lock.owns_lock()) {
|
||||
server_channel_w_lock.unlock();
|
||||
}
|
||||
}
|
||||
return command_result{std::forward<command_result_bulk>(result)};
|
||||
}
|
||||
@ -700,11 +706,14 @@ command_result ConnectedClient::handleCommandClientEdit(Command &cmd, const std:
|
||||
new_value
|
||||
);
|
||||
}
|
||||
if(update_talk_rights)
|
||||
if(update_talk_rights) {
|
||||
client->updateTalkRights(client->calculate_permission(permission::i_client_talk_power, client->getChannelId()));
|
||||
}
|
||||
|
||||
if(this->server)
|
||||
if(this->server) {
|
||||
this->server->notifyClientPropertyUpdates(client, updates);
|
||||
}
|
||||
|
||||
nickname_lock.reset();
|
||||
return command_result{error::ok};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user