Fixed text message sending
This commit is contained in:
parent
619e560152
commit
9a030bedf6
@ -543,7 +543,7 @@ command_result ConnectedClient::handleCommandSendTextMessage(Command &cmd) {
|
|||||||
channel_tree_read_lock.lock();
|
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};
|
return command_result{permission::b_client_channel_textmessage_send};
|
||||||
|
|
||||||
bool conversation_private = channel->properties()[property::CHANNEL_FLAG_CONVERSATION_PRIVATE].as<bool>();
|
bool conversation_private = channel->properties()[property::CHANNEL_FLAG_CONVERSATION_PRIVATE].as<bool>();
|
||||||
|
@ -706,6 +706,7 @@ command_result QueryClient::handleCommandInstanceInfo(Command& cmd) {
|
|||||||
res[e.type().name] = e.as<string>();
|
res[e.type().name] = e.as<string>();
|
||||||
if(!this->properties()[property::CLIENT_LOGIN_NAME].value().empty())
|
if(!this->properties()[property::CLIENT_LOGIN_NAME].value().empty())
|
||||||
res["serverinstance_teaspeak"] = true;
|
res["serverinstance_teaspeak"] = true;
|
||||||
|
res["serverinstance_serverquery_max_connections_per_ip"] = res["serverinstance_query_max_connections_per_ip"].as<std::string>();
|
||||||
|
|
||||||
this->sendCommand(res);
|
this->sendCommand(res);
|
||||||
return command_result{error::ok};
|
return command_result{error::ok};
|
||||||
@ -716,6 +717,9 @@ command_result QueryClient::handleCommandInstanceEdit(Command& cmd) {
|
|||||||
|
|
||||||
for(const auto &key : cmd[0].keys()){
|
for(const auto &key : cmd[0].keys()){
|
||||||
auto info = property::impl::info<property::InstanceProperties>(key);
|
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) {
|
if(*info == property::SERVERINSTANCE_UNDEFINED) {
|
||||||
logError(LOG_QUERY, "Query {} tried to change a non existing instance property: {}", this->getLoggingPeerIp(), key);
|
logError(LOG_QUERY, "Query {} tried to change a non existing instance property: {}", this->getLoggingPeerIp(), key);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user