#!/bin/rc j='' chan='' fn format{ if(~ $1 '#'*){ if(! ~ $1 $chan) echo $1 chan=$1 shift output $j $* | awk '{print " " $0}' | fmt } if not output $j $* | fmt j=$1 } fn output{ if(~ $1 $2){ shift 2 echo ' ' $* } if not{ shift echo echo $* } } grep -e $2^'.*PRIVMSG '^$1^'.*|^PRIVMSG '^$2^' :' $3 | tail $4 | sed ' s/^PRIVMSG ((#.*)?).* :/\1 ⇒ /g s/:(.*)!.* PRIVMSG ((#.*)?).* :/\2 \1→ /g s/ //g' | while(line=`{read}) format $line