Fixed some bugs
This commit is contained in:
@@ -54,14 +54,18 @@ void VoiceClient::sendCommand0(const ts::Command &command, bool low, bool direct
|
||||
return;
|
||||
}
|
||||
|
||||
auto command_str = command.build();
|
||||
auto packet = make_shared<protocol::ServerPacket>(low ? protocol::PacketTypeInfo::CommandLow : protocol::PacketTypeInfo::Command, pipes::buffer_view{(void*) command_str.data(), command_str.length()});
|
||||
if(low) packet->enable_flag(protocol::PacketFlag::NewProtocol);
|
||||
auto packet = make_shared<protocol::ServerPacket>(
|
||||
low ? protocol::PacketTypeInfo::CommandLow : protocol::PacketTypeInfo::Command,
|
||||
pipes::buffer_view{(void*) cmd.data(), cmd.length()}
|
||||
);
|
||||
if(low) {
|
||||
packet->enable_flag(protocol::PacketFlag::NewProtocol);
|
||||
}
|
||||
packet->setListener(std::move(listener));
|
||||
this->connection->sendPacket(packet, false, direct);
|
||||
|
||||
#ifdef PKT_LOG_CMD
|
||||
logTrace(this->getServerId(), "{}[Command][Server -> Client] Sending command {}. Command low: {}. Full command: {}", CLIENT_STR_LOG_PREFIX, command.command(), low, command_str);
|
||||
logTrace(this->getServerId(), "{}[Command][Server -> Client] Sending command {}. Command low: {}. Full command: {}", CLIENT_STR_LOG_PREFIX, command.command(), low, cmd);
|
||||
#endif
|
||||
}
|
||||
void VoiceClient::sendAcknowledge(uint16_t packetId, bool low) {
|
||||
|
||||
Reference in New Issue
Block a user