Added the spin module.

This commit is contained in:
Storm Dragon 2020-07-29 20:12:32 -04:00
parent 3d8c2adde7
commit e93644f874

22
modules/spin/spin.sh Executable file
View File

@ -0,0 +1,22 @@
[ -f functions.sh ] && source functions.sh
userNick="$1"
shift
chan="$1"
shift
spin="${*// /}"
message="$spin $spin $spin $spin "
if [[ "$spin" =~ [aeiou].$ ]]; then
for i in $(seq 10) ; do
spin+="${spin: -1}${spin: -1}"
message+="$spin "
done
else
for i in $(seq 10) ; do
spin+="${spin: -2}"
message+="$spin "
done
fi
msg "$chan" "$message"