fix dj match

This commit is contained in:
Ben Harris 2018-10-25 18:29:55 -04:00
parent e25191a53d
commit fcf48a3ca0
2 changed files with 3 additions and 3 deletions

4
bot.sh
View File

@ -10,7 +10,7 @@ echo "USER $user" >> $input
echo "JOIN #$channel" >> $input
function parse_dj {
echo $now_playing | grep -Eo '\([^)]*\)' | sed 's/[()]//g'
echo $now_playing | grep -Eo '^\([^)]*\)' | sed 's/[()]//g'
}
tail -f $input | telnet $server $port | while read res
@ -21,7 +21,7 @@ do
# now playing
if [[ $now_playing != "$(<$now_playing_file)" ]]; then
now_playing=$(<$now_playing_file)
echo "PRIVMSG #tilderadio :$now_playing" >> $input
echo -e "PRIVMSG #tilderadio :\x0303$now_playing" >> $input
fi
if [[ $dj != $(parse_dj) ]]; then

View File

@ -2,7 +2,7 @@
$json = json_decode(file_get_contents('php://input'));
$msg = "\x0303";
$msg = "";
if ($json->live->is_live)
$msg .= "({$json->live->streamer_name}) ";