Re: right aligning nicks + nickmode

Franco <[email protected]> Tue, 2 Oct 2012 19:11:06 +0000
Newsgroups gmane.network.irc.irssi.user
Message-ID <20121002191106.GA15394@efikamx>
Unfortunately that does not work. It displays

<@   Bob>

I think the script is to be read this way:

    ... {ownmsgnick {ownnick $2 $['.$length.']0}}$1');
                             ^     ^
                             |     |
                         display   |
                         the '@'   |
                                   |
                                   |
                             display the name,
                             /after/ adding $length
                            spaces

If I could write something like

    $nickAndmode = $2 + $0

Then I feel

    $['.$length.']nickAndMode

would work, but I do not how how to do it in perl/irssi.

Another possible solution would be to shift the whole

    {ownnick $2 $0}

but alas, I do not know how to apply the $[-shift]number syntax
to curyly brackets, grrrrrrrrrrr



On Tue, Oct 02, 2012 at 08:34:16PM +0200, Peder Stray wrote:
> On Tue, 2 Oct 2012, Franco wrote:
> 
> >It leads to something like this
> >
> ><@  Bob> csacs
> >< Alice> cscsc
> >
> >so the nickmode is far away from the nick. This is what happens
> >when following the tip on the tips page
> 
> so you want
> 
> <  @Bob>
> 
> then i guess you can move the $2 or $3 thats after ']0 on all lines
> between 213 and 222 to the front of $[', like so:
> 
> from ... {ownmsgnick {ownnick $['.$length.']0$2}}$1');
> 
> to
> ... {ownmsgnick {ownnick $2$['.$length.']0}}$1');
> 
> and do a /set neat_right_mode ON
> 
> -- 
>   Peder Stray