mirror of
https://github.com/deavminet/gustav.git
synced 2024-12-17 20:24:42 +00:00
Sucked those offsets out of my thumb, I couldn't be ared right now
This commit is contained in:
parent
66bb86e4cd
commit
426a65cf96
@ -208,15 +208,15 @@ public final class Connection : Thread
|
||||
gprintln("DirectMessage: (Recipient): "~recipient);
|
||||
|
||||
/* Decode the [usernameLength, username] (username here is sender's) */
|
||||
ubyte sendersLength = data[1];
|
||||
ubyte sendersLength = data[2+recipientLength];
|
||||
gprintln("DirectMessage: (Sender length): "~to!(string)(sendersLength));
|
||||
string sender = cast(string)data[2+recipientLength..2+recipientLength+sendersLength];
|
||||
string sender = cast(string)data[2+recipientLength+1..2+recipientLength+1+sendersLength];
|
||||
gprintln("DirectMessage: (Sender): "~sender);
|
||||
|
||||
|
||||
|
||||
/* The message is the remainder */
|
||||
string message = cast(string)data[2+recipientLength+sendersLength..data.length];
|
||||
string message = cast(string)data[2+recipientLength+1+sendersLength..data.length];
|
||||
gprintln("DirectMessage: (Message): "~message);
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user