Fix outbound user data request/response

This commit is contained in:
Jack Hadrill
2022-03-18 22:31:50 +00:00
parent 0b19b83271
commit 3a163df991
5 changed files with 11 additions and 6 deletions

View File

@@ -33,9 +33,11 @@ export function packUserDataRequestMessage (properties: UserDataRequestMessage,
const packedData = new SmartBuffer()
packedData.writeBytes(usernameLength)
packedData.writeBytes(username)
packedData.pad(32 - username.length)
packedData.writeBytes(colour)
packedData.writeBytes(clientIdLength)
packedData.writeBytes(clientId)
packedData.pad(32 - clientId.length)
// Encrypt the data.
const data = encrypt(packedData.data, MESSAGE_TYPE, key)