Changeset fed4f76 for protocols

Timestamp:
2015-01-16T19:50:25Z (5 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
ecbd22a
Parents:
4cff28f
Message:

Fix UTF8 nick truncation issues

When nicks exceeded the length limit, they were cut at 24 bytes and that
sometimes left invalid utf8 at the end, which made the nick_ok()
validation fail and often broke those nicks completely.

This adds a truncate_utf8 function to cut the string at a safe place

Also, the method to deduplicate nicks when there's no more place to add
underscores was changed to add "_XX" at the end, where XX are two random
hex chars. The previous method in those cases was increasing the value
of the first character of the nick... which leads to silly and confusing
results (i.e. FacebookUser -> GacebookUser)

(No files)

Note: See TracChangeset for help on using the changeset viewer.