Irssi core bugs

Notice: Undefined index: tasklist_type in /var/www/bugs.irssi.org/includes/class.tpl.php(128) : eval()'d code on line 85 Notice: Undefined index: tasklist_type in /var/www/bugs.irssi.org/includes/class.tpl.php(128) : eval()'d code on line 90
  • Status New
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category core
  • Assigned To Wouter Coekaerts (coekie)
  • Operating System Solaris
  • Severity Medium
  • Priority Normal
  • Reported Version Irssi 0.8.9
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 0
  • Private No
Attached to Project: Irssi core bugs
Opened by Rado Q (Rado) - 2005-07-12
Last edited by Wouter Coekaerts (coekie) - 2005-07-15

FS#275 - /hilight -mask -line nick!*@* fails

Using the cmd
/hilight -mask -line nick!*@*
doesn't produce a highlighted line. However,
/hilight -mask -nick nick!*@*
highlights just the nick, and "-nick" must be specified for this to work at all.
Would be good if -nick or a functional -line were default for -mask.

This task does not depend on any other tasks.

Wouter Coekaerts (coekie)
Friday, 15 July 2005, 00:21 GMT
You're right about -mask -line not working (and -mask -word, but that doesn't make any sense anyways), but the default (without -nick or -line) works just fine here.

I've actually seen this problem in the code before, but apperantly didn't conclude that this would trigger the bug. The cause is (to quote the last part of my comment to  bug 131 ):
There is the hilight_update_text_dest in sig_print_text in hilight-text.c that looks like it should have done the job (because it is *before* the "if(nick_match)return;"), but the hilight_match there can't find the HILIGHT_REC back, because he doesn't know the nick and address there.

To make it a bit more clear: hilight checking happens at two different 'layers':
* the -nick hilights are handled in fe_messages, in the sig_message_public because they change which format should be used to build the line (which makes the nick appear hilighted). This is only done for public messages. (so -nick doesn't work for private messages (or all other lines, where it usually doesn't really make sense) either)
* -line and -word hilights are done in hilight-text, in sig_print_text, so after the line to be printed is already constructed, and then changes to the line are made. But at this layer all we have is the formatted line (and the TEXT_DEST_REC), but no mask, so -mask hilights don't work here.

I think it should be fixed by putting the HILIGHT_REC in the TEXT_DEST_REC in fe_messages, so the sig_print_text can just get that hilight back, and do its thing if it's a -line.
And although it sounds like a cludge if I read that sentense back, it really makes sense to me, attaching a "apply this hilighting rule"-reminder to the message. And it already has hilight_priority and hilight_color anyways.

I might implement this later, but don't have the time for it now.
Lasse Brun (Bruners)
Friday, 24 September 2010, 03:29 GMT
I would really like to see this bug get fixed, alternative ways to achieve the same would also suffice
Elbandi (Elbandi)
Tuesday, 20 September 2011, 15:21 GMT
A possible fix
Adam Borowski (KiloByte)
Sunday, 16 December 2012, 19:22 GMT
Elbandi's patch seems to work for me.

Loading...