Irssi Tips

Irssi is a popular text-based irc client for unix-like systems. For more information see the project homepage.

Scripts

Irssi supports a powerful scripting system, with several scripts written specifically for Bitlbee by Tijmen 'timing' Ruizendaal and Matt Sparks.

Scripts are installed into ~/.irssi/scripts/ and loaded inside irssi with the command

/script load scriptname.pl

to have scripts load automatically on startup create a directory autorun inside scripts and link to the script from there:

cd ~/.irssi/scripts/
mkdir autorun
cd autorun
ln -s ../scriptname.pl

Rewriting Twitter Lines

Updates for twitter accounts in the default mode take the form:

yournick: [01:23:45] <someoneelse> Lorem ipsum dolor sit amet, consectetur adipisicing elit...

literally in raw mode this looks like:

yournick: ^B[^B^B^B01:23:45^B]^B ^B<^Bsomeoneelse^B>^B Lorem ipsum dolor sit amet, consectetur adipisicing elit...

(Note the two extra bold commands after the opening bracket.) These lines can be modified according to regexp rules using the trigger plugin installed as above. Once installed the following triggers may be useful...

Strip yournick from the start of the line so it won't trigger nick highlighting. (Replace yournick with your actual nickname.)

/trigger add -publics -masks '*!twitter_*@twitter' -channels '&bitlbee' -regexp '^yournick: ' -replace ''
/trigger save

Next is an alternate, more complicated command that strips yournick, the timestamp that may follow, and puts the name of the tweet sender in green text. Inside the replace statement following \x03 is the 3 indicating the color green. Another color can be chosen from this list.

/trigger add -publics -masks '*!twitter_*@twitter' -channels '&bitlbee' -regexp '^yournick: (\x02\[\x02+\d\d:\d\d:\d\d\x02\]\x02  )?\x02<\x02([^>]+)\x02>\x02' -replace '<\x033$2\x0F>'
/trigger save