Updated the config and fixed stuff

This commit is contained in:
WolverinDEV
2020-02-03 19:41:18 +01:00
parent 6297b4cba7
commit 76342bbb96
7 changed files with 40 additions and 14 deletions
@@ -43,7 +43,10 @@ void VoiceClient::handlePacketCommand(const pipes::buffer_view& command_string)
}
void VoiceClient::handlePacketPing(const protocol::IncomingClientPacketParser& packet) {
(void) packet.payload().length();
if (packet.type() == protocol::PONG) {
if(packet.payload_length() < 2) return;
uint16_t id = be2le16((char*) packet.payload().data_ptr());
if (this->lastPingId == id) {
#ifdef PKT_LOG_PING