this can be used as a bare-bones irc client like so:
IRC_PASSWD=... ./ircpipe -n $NICK -p -s $BOUNCER_HOST | ./highlight | ts
('ts' being the timestamping tool from moreutils)
the code for this looks a bit wonky, but that's kind of on purpose:
while we first parse the message, we then not use this for actual output
and instead slice the raw line and splice in control sequences, as to
not accidentally modify the input; copy-pasting from it should yield the
same bytes as it processed (modulo mIRC style color control chars).
using bytes instead of native strings is necessary as to not break on
non-utf8-encoded messages, something that regularly happens in practise.