Encode sender's username in direct messages

This commit is contained in:
Tristan B. Kildaire 2021-01-28 16:18:33 +02:00
parent 1c9168a6b8
commit d6a62713a2
1 changed files with 7 additions and 1 deletions

View File

@ -923,12 +923,18 @@ public class DConnection : Thread
/* Set to user message (direct message, sub-sub-type) */
protocolData ~= [1];
/* Encode the sender's length */
/* Encode the recipients's length */
protocolData ~= [cast(byte)username.length];
/* Encode the username */
protocolData ~= cast(byte[])username;
/* Encode the sender's's length */
protocolData ~= [cast(byte)this.username.length];
/* Encode the sender */
protocolData ~= cast(byte[])this.username;
/* Encode the message */
protocolData ~= cast(byte[])message;