1.4.10 updates

This commit is contained in:
WolverinDEV
2020-02-28 11:24:07 +01:00
parent 2b929fd3c0
commit 0d456eea5d
48 changed files with 2267 additions and 781 deletions
+2 -2
View File
@@ -84,11 +84,11 @@ void ServerConnection::handlePacketDisconnect(const std::string& message) {
}
void ServerConnection::handlePacketHandshake(const std::string& data) {
if(this->protocol.state != protocol::HANDSCAKE) LERROR("Protocol state mismatch");
if(this->protocol.state != protocol::HANDSCHAKE) LERROR("Protocol state mismatch");
if(data.length() < 3) LERROR("Invalid packet size");
if((uint8_t) data[0] != 0xAF || (uint8_t) data[1] != 0xFE) LERROR("Invalid handshake");
if((uint8_t) data[2] != LICENSE_PROT_VERSION) LERROR("Invalid license protocol version. Please update TeaSpeak!");
if((uint8_t) data[2] != 2) LERROR("Invalid license protocol version. Please update this client!");
auto key_length = be2le16(data.data(), 3);
if(data.length() < key_length + 3) LERROR("Invalid packet size");