Skip to content

Conversation

@jensecj
Copy link

@jensecj jensecj commented Jul 1, 2021

Adds a new variable circe-color-nicks-persist which causes nicknames to be colored by using their hash as an index into circe-nick-color-pool.

There are a couple of minor foibles:

Changing the signature of circe-nick-color-pick breaks backwards-compatability, I have looked around and not found anyone who actually used this anywhere, so I don't think it's a major problem, could be solved by making the new argument optional.

Changing circe-color-nicks-persist after some nicks have been popped from the pool reduces the available colors, but I don't imagine people flip-flopping the setting often.

@wasamasa
Copy link
Collaborator

I'd use a separate pool for fixed colors. That way it won't be depleted.

The hashing approach seems a tad clownshoes. Is it adapted from an existing solution? If not, I'd reuse something from Weechat: https://github.com/weechat/weechat/blob/master/src/gui/gui-nick.c

Might also make the code clearer to have a customizable hash function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants