2020-07-29 20:12:32 -04:00
|
|
|
[ -f functions.sh ] && source functions.sh
|
|
|
|
|
|
|
|
userNick="$1"
|
|
|
|
shift
|
|
|
|
chan="$1"
|
|
|
|
shift
|
2020-07-30 00:45:53 -04:00
|
|
|
message="${*}"
|
2020-08-03 19:09:13 -04:00
|
|
|
spinPlus="${message##*(}"
|
|
|
|
spinPlus="${spinPlus%)}"
|
|
|
|
message="${message% (*)}"
|
2020-07-30 00:45:53 -04:00
|
|
|
spin="${message##*[[:space:]]}"
|
2020-08-03 19:09:13 -04:00
|
|
|
if [[ "$spinPlus" == "$message" ]]; then
|
|
|
|
if [[ "$spin" =~ [aeiou].$ ]]; then
|
|
|
|
spinPlus="${spin: -1}${spin: -1}"
|
|
|
|
else
|
|
|
|
spinPlus="${spin: -2}"
|
|
|
|
fi
|
|
|
|
fi
|
2020-07-29 20:12:32 -04:00
|
|
|
|
2020-07-30 00:45:53 -04:00
|
|
|
message="${message} $spin $spin $spin "
|
2020-07-31 12:58:04 -04:00
|
|
|
spinCount=$((RANDOM % 7 + 7))
|
2020-08-03 19:09:13 -04:00
|
|
|
for i in $(seq $spinCount) ; do
|
|
|
|
spin+="$spinPlus"
|
|
|
|
message+="$spin "
|
2020-07-29 20:12:32 -04:00
|
|
|
done
|
|
|
|
|
|
|
|
msg "$chan" "$message"
|