Blog

Trouble with indentation

Added by Christoph Kappel about 6 years ago

irssi doesn't provide indentation stuff like weechat, but this can be archieved with a little perl trick: Just prepend the nickname with whitespaces or cut it after some letters.

This works fine until nickcolor.pl comes into play. First, I thought this is a bug in irssi and I tested various things and version. Then I asked google and to my surprise someone had the same issue

Based on that, the whole thing was easy to fix. Since nickcolor.pl overwrites the format I need to change exactly that:

 1 --- a/.irssi/scripts/nickcolor.pl    Sat Jan 08 21:47:43 2011 +0100
 2 +++ b/.irssi/scripts/nickcolor.pl    Sat Jan 22 16:13:19 2011 +0100
 3 @@ -93,7 +93,8 @@
 4    }
 5 
 6    $color = "0".$color if ($color < 10);
 7 -  $server->command('/^format pubmsg {pubmsgnick $2 {pubnick '.chr(3).$color.'$0}}$1');
 8 +  #$server->command('/^format pubmsg {pubmsgnick $2 {pubnick '.chr(3).$color.'$0}}$1');
 9 +  $server->command('/^format pubmsg {pubmsgnick $2 {pubnick '.chr(3).$color.'$[-11]0}}$1');
10  }
11 
12  sub sig_private {

Also available in: Atom RSS