forked from tilderadio/radiobot
fix join and it works now!
This commit is contained in:
parent
fe38f96235
commit
5c2a2fca14
|
@ -1,6 +1,6 @@
|
|||
server="localhost"
|
||||
port="6667"
|
||||
now_playing_file="/home/ben/public_html/now_playing.txt"
|
||||
now_playing_file="/home/ben/public_html/radio/now_playing.txt"
|
||||
channel="tilderadio"
|
||||
nick="radiobot"
|
||||
user="radiobot tilderadio radiobot :radiobot"
|
||||
|
|
12
bot.sh
12
bot.sh
|
@ -2,7 +2,7 @@
|
|||
|
||||
. bot.properties
|
||||
input=".bot.cfg"
|
||||
now_playing=$(cat $now_playing_file)
|
||||
now_playing=$(<$now_playing_file)
|
||||
echo "Starting session: $(date "+[%y:%m:%d %T]")">$log
|
||||
echo "NICK $nick" > $input
|
||||
echo "USER $user" >> $input
|
||||
|
@ -14,8 +14,8 @@ do
|
|||
echo "$(date "+[%y:%m:%d %T]")$res" >> $log
|
||||
|
||||
# now playing
|
||||
if [$now_playing != $(cat $now_playing_file)]; then
|
||||
now_playing=$(cat $now_playing_file)
|
||||
if [[ $now_playing != "$(<$now_playing_file)" ]]; then
|
||||
now_playing=$(<$now_playing_file)
|
||||
echo "PRIVMSG #tilderadio :Now Playing on tilderadio: $now_playing" >> $input
|
||||
fi
|
||||
|
||||
|
@ -25,6 +25,12 @@ do
|
|||
PING*)
|
||||
echo "$res" | sed "s/I/O/" >> $input
|
||||
;;
|
||||
|
||||
# make sure we're joined
|
||||
*376*|*404*)
|
||||
echo "JOIN #$channel" >> $input
|
||||
;;
|
||||
|
||||
# else
|
||||
*)
|
||||
echo "$res"
|
||||
|
|
Loading…
Reference in New Issue