URL:
  <http://savannah.nongnu.org/patch/?8062>

                 Summary: Better hash function for the nick colors
                 Project: WeeChat
            Submitted by: seirl
            Submitted on: Thu 30 May 2013 01:56:27 PM GMT
                Category: irc plugin
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                IRC nick: seirl

    _______________________________________________________

Details:

Currently the hash function used to color nicks in the IRC plugin is a simple
sum of every unicode character of the colored nick. 
This causes some problems :
* Two nicks that are identical except some permutated letters (alice and
ailce) will display identically;
* Speaking more generally, similar nicks (alice and alidd), instead of being
visually distinguished by the colors, are more likely to appear identically
and being confused more easily.

Using a hash function with a better randomized repartition (in this case, the
djb2 algorithm) is a way of solving this problem.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 30 May 2013 01:56:27 PM GMT  Name: irc-nick.c.patch  Size: 183B  
By: seirl
Patch for src/plugins/irc/irc-nick.c
<http://savannah.nongnu.org/patch/download.php?file_id=28210>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?8062>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/


_______________________________________________
Weechat-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/weechat-dev

Reply via email to