aboutsummaryrefslogtreecommitdiffstats
path: root/irc_channel.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-01-16 16:50:25 -0300
committerdequis <dx@dxzone.com.ar>2015-01-16 16:50:25 -0300
commitfed4f766c05e44e99917909b266c99c052ed9c3e (patch)
treeca0f96eba21d6fd019b40a6f2d2af8f0d0ebecb9 /irc_channel.c
parent4cff28fdfca2eaf71a13715b0fda114796091065 (diff)
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)
Diffstat (limited to 'irc_channel.c')
0 files changed, 0 insertions, 0 deletions