2016-09-03 18:28:43 -04:00
|
|
|
[ -f functions.sh ] && source functions.sh
|
|
|
|
|
|
|
|
shift
|
|
|
|
chan="$1"
|
|
|
|
shift
|
|
|
|
#get the lyric text into a variable
|
2017-12-03 10:55:15 -05:00
|
|
|
lyricText="$(clyrics $@ | tr '[:space:]' ' ' | tr -s ' ' | fold -s -w 384)"
|
2017-12-02 20:39:31 -05:00
|
|
|
i=$(echo "$lyricText" | wc -l)
|
2017-12-02 20:47:28 -05:00
|
|
|
i=$(($RANDOM % $i + 1))
|
2017-12-03 10:55:15 -05:00
|
|
|
lyricText="$(echo "$lyricText" | tail +$i | head -1 | rev | cut -d '.' -f2- | rev)"
|
2016-09-03 18:28:43 -04:00
|
|
|
#Display the lyric text
|
|
|
|
if [ ${#lyricText} -gt 15 ] ; then
|
2017-06-23 21:03:36 -04:00
|
|
|
msg "$chan" "${lyricText}"
|
|
|
|
exit 0
|
2016-09-03 18:28:43 -04:00
|
|
|
fi
|
2017-12-02 20:51:28 -05:00
|
|
|
msg "$chan" "no lyrics found for $@."
|
2017-06-23 21:03:36 -04:00
|
|
|
exit 0
|