Fixed reminders involving tells, added multiple word detection example in keywords.
This commit is contained in:
parent
387432cdcd
commit
b6f2351a0e
@ -17,6 +17,9 @@ else
|
||||
message="I have 2 greate big ol' hairy balls. You wanna touch 'em?"
|
||||
fi
|
||||
;;
|
||||
"does god exist?"|"is god real?"|"is there a god?")
|
||||
message="According to your $(shuf -e -n1 "mother" "daughter" "sister" "wife" "grandmother" "girl friend") I am God. She kept screaming it at me all last night, \"OH GOD ${nick^^} DON'T STOP!\""
|
||||
;;
|
||||
*)
|
||||
message="$(shuf -n1 -e "yes" "no" "maybe" "ask again later")."
|
||||
esac
|
||||
|
@ -18,7 +18,7 @@ else
|
||||
msg "$chan" "ok, $userNick, reminder in $time."
|
||||
reminderMessage="$@"
|
||||
if [[ "$reminderMessage" =~ ^[Tt]ell* ]]; then
|
||||
userNick="$(echo "$reminderMessage" | rev | cut -d ' ' -f2 | rev)"
|
||||
userNick="$(echo "${reminderMessage#[T|t]ell }" | cut -d ' ' -f1)"
|
||||
reminderMessage="${reminderMessage#[Tt]ell }"
|
||||
reminderMessage="${reminderMessage#* }"
|
||||
fi
|
||||
|
@ -19,3 +19,8 @@ if [[ -n "${keywords[${w,,}]}" ]]; then
|
||||
eval ${keywords[${w,,}]}
|
||||
fi
|
||||
done
|
||||
|
||||
# Example of dealing with multi word triggers.
|
||||
if [[ "${wordList//[[:space:]]}" =~ .*nowplaying.* ]]; then
|
||||
act "$chan" "cranks the volume up to 11!"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user