More improvements to lyrics module.

This commit is contained in:
Storm Dragon 2016-09-04 23:14:03 -04:00
parent af4739ddd8
commit 7a9f6a853f
1 changed files with 2 additions and 1 deletions

View File

@ -32,8 +32,9 @@ lyricText="$(echo "$lyricText" | tr "[:space:]" " " | tr -s "[:space:]")"
#sometimes lyrics are just one long line with everything. If this happens, cut it down so it's not too long for the 512 character channel limit.
if [ ${#lyricText} -gt 412 ] ; then
lyricText="${lyricText:0:409}... "
lyricText="$(echo "$lyricText" | rev | cut -d " " -f 1- | rev | sed -e 's/try { _.*//g')"
lyricText="$(echo "$lyricText" | rev | cut -d " " -f 1- | rev)"
fi
lyricText="$(echo "$lyricText" | sed -e 's/try {.*//g' -e 's/ +_402_Show//g')"
#Display the lyric text
if [ ${#lyricText} -gt 15 ] ; then
act "$chan" "sings, '${lyricText}'"