Aha2Y

IRC bot - RealTime Log Streamer

Oct 10th, 2011
570
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.32 KB | None | 0 0
  1. #!/bin/bash
  2. fifo="$(mktemp -u)"
  3. mkfifo "$fifo"
  4.  
  5. trap "rm -f $fifo" EXIT
  6.  
  7. while :; do
  8. sic -h <server> -n <bot name> < "$fifo" &
  9.  
  10. {
  11.     sleep 2
  12.     echo ":m nickserv identify <nick password>"
  13.     echo ":s #channel"
  14.     echo ":j #channel"
  15.     sleep 1
  16.     tail -n0 -f <dir to the file you want to stream>
  17. } > "$fifo"
  18. done
  19.  
  20.  
  21.  
Add Comment
Please, Sign In to add comment