DingGGu / bnubot

Automatically exported from code.google.com/p/bnubot
0 stars 0 forks source link

Improve chat splitter/unicode/encryption support #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Make the ChatQueue responsible for sending targeted messages, encrypting
text, etc, so that the following things will not occur:

* A user sends a command, and leaves the channel. Whisperback is off, so
the user never sees the response

* You type a really long line of encrypted text. The Chatqueue splits it
up, and the remaining part of the message is irrecoverable

Original issue reported on code.google.com by sco...@gmail.com on 11 May 2008 at 6:59

GoogleCodeExporter commented 9 years ago
This isn't actually the responsibility of the ChatQueue; let's create a 
ByteArray
class to handle bnet "strings" stored in UTF-8 encoded byte arrays. This will 
prevent
any possibility of screwing up the unicode characters.

Encryption will work on the ByteArray objects, so that unicode strings will be
implicitly converted to UTF-8, and never get the chance to be screwed up.

The ByteArrays should be converted back to unicode Strings before they touch any
EventHandlers

Fixed by r1570

Original comment by sco...@gmail.com on 26 Jun 2008 at 7:27

GoogleCodeExporter commented 9 years ago

Original comment by sco...@gmail.com on 26 Jun 2008 at 7:27

GoogleCodeExporter commented 9 years ago
See-also: issue 96, on the topic of what happens if a utf-8 encoded string is 
split
in the middle of a utf-8 encoded character

Original comment by sco...@gmail.com on 26 Jun 2008 at 7:35