irssi-import / bugs.irssi.org

bugs.irssi.org archive
https://github.com/irssi/irssi/issues
0 stars 0 forks source link

TEXT_DEST_REC modifications are ignored by signal_contine() #794

Open irssibot opened 13 years ago

irssibot commented 13 years ago

I'm writing a script that's trying to cause a message that would cause a hilight to not hilight.

I registered code in 'print text' that will strip the MSGLEVEL_HILIGHT bit, and set MSGLEVEL_NOHILIGHT in the $dest->{level}. Then issue a signal_continue().

This seems to do nothing. If I make changes to the text, in the same signal_continue() call, those changes DO take effect.

Sample code:

Irssi::signal_add('print text', 'sig_incoming');

sub sigincoming { my ($dest, $text, $stripped) = @;

  $dest->{level} = $dest->{level} & ~MSGLEVEL_HILIGHT | MSGLEVEL_NOHILIGHT;
  Irssi::signal_continue($dest, $text, $stripped);

}