Updates for beta10
This commit is contained in:
@@ -44,9 +44,9 @@ command_result ConnectedClient::handleCommandChannelGetDescription(Command &cmd)
|
||||
assert(channel);
|
||||
|
||||
if(!permission::v2::permission_granted(1, this->calculate_permission(permission::b_channel_ignore_description_view_power, channel->channelId()))) {
|
||||
auto view_power = this->calculate_permission(permission::i_channel_needed_description_view_power, channel->channelId());
|
||||
if(!channel->permission_granted(permission::i_channel_description_view_power, view_power, false))
|
||||
command_result{permission::i_channel_description_view_power};
|
||||
auto view_power = this->calculate_permission(permission::i_channel_description_view_power, channel->channelId());
|
||||
if(!channel->permission_granted(permission::i_channel_needed_description_view_power, view_power, false))
|
||||
return command_result{permission::i_channel_description_view_power};
|
||||
}
|
||||
|
||||
this->sendChannelDescription(channel, true);
|
||||
@@ -604,7 +604,7 @@ command_result ConnectedClient::handleCommandChannelCreate(Command &cmd) {
|
||||
}
|
||||
}
|
||||
|
||||
if(created_total >= this->server->properties()[property::VIRTUALSERVER_MAX_CHANNELS].as<uint64_t>())
|
||||
if(this->server && created_total >= this->server->properties()[property::VIRTUALSERVER_MAX_CHANNELS].as<uint64_t>())
|
||||
return command_result{error::channel_limit_reached};
|
||||
|
||||
auto max_channels = this->calculate_permission(permission::i_client_max_channels, 0, false, permission_cache);
|
||||
|
||||
Reference in New Issue
Block a user