Skip to content

Instantly share code, notes, and snippets.

@hunner
Created May 31, 2014 01:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hunner/63f66eeaa7e81c816618 to your computer and use it in GitHub Desktop.
Save hunner/63f66eeaa7e81c816618 to your computer and use it in GitHub Desktop.
Bash irc bot
#!/usr/bin/env bash
line=""
started=""
rm botfile
mkfifo botfile
tail -f botfile | nc irc.cat.pdx.edu 6667 | while true ; do
if [ -z $started ] ; then
echo "USER bdbot 0 bdbot :I iz a bot" > botfile
echo "NICK bdbot" >> botfile
echo "JOIN #notzombies" >> botfile
started="yes"
fi
read irc
#echo $irc
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment