fixed the multi word trigger section of keywords.sh

This commit is contained in:
Storm Dragon 2016-09-25 00:25:52 -04:00
parent 3d8f2325a5
commit 64988dec7b

View File

@ -21,6 +21,8 @@ fi
done
# Example of dealing with multi word triggers.
if [[ "${wordList//[[:space:]]/}" =~ nowplaying ]]; then
act "$chan" "cranks the volume up to 11!"
# Reset wordList without sorting it and with spaces removed.
wordList="$(echo "${@,,}" | tr -d '[:space:]')"
if [[ "$wordList" =~ .*nowplaying:.*-.* ]]; then
act "$chan" "$(shuf -n1 -e "cranks the volume up to 11" "got soooo high at that show" "boogies down the the sound of the band")!"
fi