canonical source is https://github.com/irssi/scripts.irssi.org/blob/gh-pages/scripts/hipchat_complete.pl