IRCbot - Realtime file streamer
Platform: Shell
Published Oct 10, 2011
Updated Oct 10, 2011
Ever wanted to stream files to IRC?
For a example logfiles and such.
Well now you can with script, It will stream every line/text/update/log to a IRC channel.
Usefull for Eggdrops or ZNC with their log files.
You can also stream the text of a "screen" to IRC but then you need to modify the script.
Credits to The-Compiler #!/bin/bash
fifo="$(mktemp -u)"
mkfifo "$fifo"
trap "rm -f $fifo" EXIT
while :; do
sic -h <server> -n <bot name> < "$fifo" &
{
sleep 2
echo ":m nickserv identify <nick password>"
echo ":s #channel"
echo ":j #channel"
sleep 1
tail -n0 -f <dir to the file you want to stream>
} > "$fifo"
done