Fixed text message sending

This commit is contained in:
WolverinDEV 2020-01-30 10:05:01 +01:00
parent 619e560152
commit 9a030bedf6
2 changed files with 5 additions and 1 deletions

View File

@ -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<bool>();

View File

@ -706,6 +706,7 @@ command_result QueryClient::handleCommandInstanceInfo(Command& cmd) {
res[e.type().name] = e.as<string>();
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<std::string>();
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<property::InstanceProperties>(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;