diff --git a/server/src/client/command_handler/misc.cpp b/server/src/client/command_handler/misc.cpp index 37f9957..b6291f0 100644 --- a/server/src/client/command_handler/misc.cpp +++ b/server/src/client/command_handler/misc.cpp @@ -543,7 +543,7 @@ command_result ConnectedClient::handleCommandSendTextMessage(Command &cmd) { channel_tree_read_lock.lock(); } - ACTION_REQUIRES_PERMISSION(permission::b_client_channel_textmessage_send, 1, channel_id); + if(!permission::v2::permission_granted(1, this->calculate_permission(permission::b_client_channel_textmessage_send, channel_id), false)) \ return command_result{permission::b_client_channel_textmessage_send}; bool conversation_private = channel->properties()[property::CHANNEL_FLAG_CONVERSATION_PRIVATE].as(); diff --git a/server/src/client/query/QueryClientCommands.cpp b/server/src/client/query/QueryClientCommands.cpp index 0c6a510..00c19b7 100644 --- a/server/src/client/query/QueryClientCommands.cpp +++ b/server/src/client/query/QueryClientCommands.cpp @@ -706,6 +706,7 @@ command_result QueryClient::handleCommandInstanceInfo(Command& cmd) { res[e.type().name] = e.as(); if(!this->properties()[property::CLIENT_LOGIN_NAME].value().empty()) res["serverinstance_teaspeak"] = true; + res["serverinstance_serverquery_max_connections_per_ip"] = res["serverinstance_query_max_connections_per_ip"].as(); this->sendCommand(res); return command_result{error::ok}; @@ -716,6 +717,9 @@ command_result QueryClient::handleCommandInstanceEdit(Command& cmd) { for(const auto &key : cmd[0].keys()){ auto info = property::impl::info(key); + if(key == "serverinstance_serverquery_max_connections_per_ip") + info = property::impl::info(property::SERVERINSTANCE_QUERY_MAX_CONNECTIONS_PER_IP); + if(*info == property::SERVERINSTANCE_UNDEFINED) { logError(LOG_QUERY, "Query {} tried to change a non existing instance property: {}", this->getLoggingPeerIp(), key); continue;