mirror of https://github.com/deavminet/dnetd.git
Encode sender's username in direct messages
This commit is contained in:
parent
1c9168a6b8
commit
d6a62713a2
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue