irc-bot/connect-handler

24 lines
426 B
Plaintext
Raw Normal View History

2011-06-09 21:27:24 -06:00
#! /bin/sh -e
# UCSPI wants communication on fd7
if [ -n "$PROTO" ]; then
fd=7
else
fd=1
fi
2012-05-14 13:37:28 -06:00
if [ -x $botdir/login ]; then
$botdir/login 1>& $fd
else
echo "NICK $nickname" 1>& $fd
echo "USER $nickname $nickname $nickname :$realname" 1>& $fd
fi
2011-06-09 21:27:24 -06:00
2012-05-14 13:37:28 -06:00
if [ -f $botdir/opts ]; then
read -r opts < $botdir/opts
else
opts="-i 500000"
2011-06-09 21:27:24 -06:00
fi
2012-05-14 13:37:28 -06:00
exec $ircdir/dispatch $fifo $opts $ircdir/irc-filter $botdir/handler