From 64988dec7b02db38f9b81fc603eb3c00e2a5b6dc Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 25 Sep 2016 00:25:52 -0400 Subject: [PATCH] fixed the multi word trigger section of keywords.sh --- triggers/keywords/keywords.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/triggers/keywords/keywords.sh b/triggers/keywords/keywords.sh index 0e96a1b..8b69feb 100755 --- a/triggers/keywords/keywords.sh +++ b/triggers/keywords/keywords.sh @@ -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