Did you know? Slexy is a verb! Alright, so it's not in a dictionary, but feel free to use it as a verb!
Author: Anonymous Language: bash
Description: No description Timestamp: 2008-10-11 09:36:40 -0400
View raw paste Reply
  1. #!/usr/bin/env bash
  2. # shellbot.sh - IRC Bot
  3. # Author: Sean B. Palmer, inamidst.com
  4.  
  5. NICK=shbot
  6. SERVER=${1:-irc.freenode.net}
  7. CHANNEL=${2:-#swhack}
  8.  
  9. echo "NICK $NICK" > shellbot.input
  10. echo "USER $(whoami) +iw $NICK :$0" >> shellbot.input
  11. echo "JOIN $CHANNEL" >> shellbot.input
  12.  
  13. tail -f shellbot.input | telnet $SERVER 6667 | \
  14.    while true
  15.    do read LINE || break
  16.  
  17.       echo $LINE
  18.       if echo $LINE | egrep "$NICK: ping$" &> /dev/null
  19.       then echo "PRIVMSG $CHANNEL :pong" >> shellbot.input
  20.       fi
  21.    done
  22.  
  23. # [EOF]
  24.  
View raw paste Reply