stormbot/triggers/greet/greet.sh
2016-09-04 12:43:22 -04:00

16 lines
329 B
Bash
Executable File

[ -f functions.sh ] && source functions.sh
# All names to match are completely lowercase.
case "${1,,}" in
storm_dragon)
msg "$2" "my lord, $1: how may I serve you?"
;;
*)
greeting=(
Greetings
"Howdy, welcome to $2!"
"Wazzup Moe Fugger!"
"Welcome to $2!"
)
msg "$2" "$1: ${greeting[$(($RANDOM % ${#greeting[@]}))]}"
esac