Merge branch 'master' into 1.4.0
This commit is contained in:
commit
e38199e6c7
@ -1707,9 +1707,13 @@ CommandResult ConnectedClient::handleCommandChannelEdit(Command &cmd) {
|
||||
bool target_channel_type_changed = false;
|
||||
ChannelType::ChannelType target_channel_type = channel->channelType();
|
||||
CHANNEL_PERM_TEST_INIT;
|
||||
CHANNEL_PERMISSION_TEST(permission::i_channel_modify_power, permission::i_channel_needed_modify_power, channel, true);
|
||||
|
||||
for (const auto &key : cmd[0].keys()) {
|
||||
if(key == "cid")
|
||||
continue;
|
||||
if(key == "return_code")
|
||||
continue;
|
||||
|
||||
const auto &property = property::info<property::ChannelProperties>(key);
|
||||
if(*property == property::CHANNEL_UNDEFINED) {
|
||||
@ -1727,6 +1731,9 @@ CommandResult ConnectedClient::handleCommandChannelEdit(Command &cmd) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(channel->properties()[*property].as<string>() == cmd[key].as<string>())
|
||||
continue; /* we dont need to update stuff which is the same */
|
||||
|
||||
if(key == "channel_icon_id") {
|
||||
CHANNEL_PERMISSION_TEST(permission::i_channel_permission_modify_power, permission::i_channel_needed_permission_modify_power, channel, true);
|
||||
} else if (key == "channel_order") {
|
||||
|
@ -61,6 +61,7 @@ bool ConnectedClient::notifyServerGroupList() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool ConnectedClient::notifyGroupPermList(const std::shared_ptr<Group>& group, bool as_sid) {
|
||||
Command cmd(this->getExternalType() == CLIENT_TEAMSPEAK ? group->target() == GROUPTARGET_SERVER ? "notifyservergrouppermlist" : "notifychannelgrouppermlist" : "");
|
||||
if (group->target() == GROUPTARGET_SERVER)
|
||||
@ -94,9 +95,9 @@ bool ConnectedClient::notifyGroupPermList(const std::shared_ptr<Group>& group, b
|
||||
|
||||
auto type = permission::resolvePermissionData(get<0>(permission_data));
|
||||
if(as_sid) {
|
||||
cmd[index]["permsid"] = type->name;
|
||||
cmd[index]["permsid"] = type->grant_name;
|
||||
} else {
|
||||
cmd[index]["permid"] = (uint16_t) type->type;
|
||||
cmd[index]["permid"] = (uint16_t) (type->type | PERM_ID_GRANT);
|
||||
}
|
||||
cmd[index]["permvalue"] = permission.values.value;
|
||||
cmd[index]["permnegated"] = permission.flags.negate;
|
||||
|
Loading…
Reference in New Issue
Block a user