From The Compiler, 6 Years ago, written in Bash.
Embed
  1. #!/bin/bash
  2. # Needs shic from https://github.com/halhen/shic
  3.  
  4. export SHIC_HOST=irc.rizon.net
  5. export SHIC_NICK=raboof
  6.  
  7. fifo="$(mktemp -u)"
  8. mkfifo "$fifo"
  9.  
  10. trap "rm -f $fifo" EXIT
  11.  
  12. ./shic < "$fifo" &
  13.  
  14. (
  15.         sleep 15
  16.         echo ":m nickserv identify <censored>"
  17.         sleep 5
  18.         echo ":j #raboof"
  19.         echo ":s #raboof"
  20.         sleep 1
  21.         tail -n0 -f /home/foobar/supybot/logs/messages.log | \
  22.                 sed -u '/INFO.*supybot identify called/s/ [^ ]*\.$/ <censored>/' | \
  23.                 sed -u '/INFO.*supybot register called/s/ [^ ]*\.$/ <censored>/' | \
  24.                 sed -u '/INFO.*supybot set password called/s/[^ ]* [^ ]*\.$/ <censored>/'
  25. ) > "$fifo"