don't bother joining til later

This commit is contained in:
Ben Harris 2018-11-17 21:12:12 -05:00
parent a025d9f3ec
commit 0eb56fa8e5
Signed by untrusted user: ben
GPG Key ID: 4E0AF802FFF7960C
1 changed files with 4 additions and 5 deletions

9
bot.sh
View File

@ -6,10 +6,6 @@ echo "Starting session: $(date "+[%y:%m:%d %T]")">$log
echo "NICK $nick" > $input
echo "USER $user" >> $input
echo "MODE $nick +B" >> $input
echo "JOIN #$channel" >> $input
echo "JOIN #meta" >> $input
echo "JOIN #music" >> $input
echo "JOIN #yourtilde" >> $input
function save_info {
@ -38,7 +34,7 @@ do
echo "PRIVMSG #meta :$dj is now online! tune in now here: https://bhh.sh/listen" >> $input
echo "PRIVMSG #music :$dj is now online! tune in now here: https://bhh.sh/listen" >> $input
echo "PRIVMSG #yourtilde :$dj is now online! tune in now here: https://bhh.sh/listen" >> $input
while read -u 10 subscriber; do
echo "PRIVMSG $subscriber :$dj is now online! tune in now here: https://bhh.sh/listen" >> $input
done 10< subscribers.txt
@ -68,6 +64,9 @@ do
# make sure we're joined
*376*|*404*)
echo "JOIN #$channel" >> $input
echo "JOIN #meta" >> $input
echo "JOIN #music" >> $input
echo "JOIN #yourtilde" >> $input
;;
# run when a message is seen