Changelog: Added option to set specific mention color

This commit is contained in:
Mark Qvist 2026-05-22 23:10:33 +02:00
parent 814cd043b8
commit 859aaeeba9
3 changed files with 23 additions and 2 deletions

View file

@ -1314,12 +1314,15 @@ def _message_widget(app, hub, room, m, link_delegate=None):
mb = span[1]
if ms.startswith("irc_mention"):
if not app.rrc_nick_colors:
message_body += f"`!`F{t['mention']}{mb}`f`!"
if app.rrc_mention_color: mention_color = f"`FT{app.rrc_mention_color}"
else: mention_color = f"`F{t['mention']}"
message_body += f"`!{mention_color}{mb}`f`!"
if app.rrc_color_mention_timestamps: irc_ts = f"`F{t['mention']}"
else:
try:
own_nick_color = get_nick_color(app.identity.hash, t, app)
if not app.rrc_mention_color: own_nick_color = get_nick_color(app.identity.hash, t, app)
else: own_nick_color = app.rrc_mention_color
message_body += f"`!`FT{own_nick_color}{mb}`f`!"
if app.rrc_color_mention_timestamps: irc_ts = f"`FT{own_nick_color}"

View file

@ -1000,6 +1000,12 @@ Whether or not to render micron formatting in messages. When using micron in mes
Whether or not to render RRC nicks in distinct colors based on identity hash.
<
>>>
`!mention_color = None`!
>>>>
Sets a specific color for mentions of your nick, for example FFBB44.
<
>>>
`!color_mention_timestamps = yes`!
>>>>