Added a cuss module, several minor code improvements.
This commit is contained in:
parent
12204246ca
commit
2ffd9ae28f
2
bot.sh
2
bot.sh
@ -80,7 +80,7 @@ do
|
|||||||
fi
|
fi
|
||||||
./modules/${com% *}/${com% *}.sh "$who" "$from" "$will"
|
./modules/${com% *}/${com% *}.sh "$who" "$from" "$will"
|
||||||
else
|
else
|
||||||
./triggers/keywords/keywords.sh "$from" "$res"
|
./triggers/keywords/keywords.sh "$who" "$from" "$res"
|
||||||
fi
|
fi
|
||||||
# "#" would mean it's a channel
|
# "#" would mean it's a channel
|
||||||
if [ "$(echo "$from" | grep '#')" ]; then
|
if [ "$(echo "$from" | grep '#')" ]; then
|
||||||
|
15
modules/cuss/cuss.sh
Executable file
15
modules/cuss/cuss.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
[ -f functions.sh ] && source functions.sh
|
||||||
|
|
||||||
|
# Add phrases in quotes to the array.
|
||||||
|
phrases=(
|
||||||
|
"cuss words, just let 'em roll, mother fucking shit god damn ass hole!"
|
||||||
|
"damn!"
|
||||||
|
"fuck the fucking fuckers!"
|
||||||
|
"fuck!"
|
||||||
|
"god damn it!"
|
||||||
|
"motherfucker"
|
||||||
|
"shit, piss, fuck, cunt, cocksucker, motherfucker, and tits."
|
||||||
|
"shit!"
|
||||||
|
"son of a bitch!"
|
||||||
|
)
|
||||||
|
msg "$2" "${phrases[$(($RANDOM % ${#phrases[@]}))]}"
|
@ -1,11 +1,16 @@
|
|||||||
[ -f functions.sh ] && source functions.sh
|
[ -f functions.sh ] && source functions.sh
|
||||||
|
|
||||||
|
who="$1"
|
||||||
|
shift
|
||||||
chan="$1"
|
chan="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
# each word is stored in an associative array, with the actions to be taken as the array's contents.
|
# each word is stored in an associative array, with the actions to be taken as the array's contents.
|
||||||
|
# the variable $chan contains the channel that caused the trigger.
|
||||||
|
# the variable $who contains the nick that caused the trigger.
|
||||||
declare -A keywords
|
declare -A keywords
|
||||||
keywords[linux]="msg '$chan' 'awesome!'"
|
keywords[linux]="msg \"$chan\" \"awesome!\""
|
||||||
|
keywords[chicken]="msg \"$chan\" \"$who, I'm gonna grab me $(shuf -n1 -e "a case of beer" "a weed eater" "a 5 gallon jug of vaseline") and a $(shuf -n1 -e dead frozen live young) chicken, and have fun ALL NIGHT LONG!!!\""
|
||||||
|
|
||||||
wordList="$(echo "$@" | tr '[:space:]' $'\n' | sort -u)"
|
wordList="$(echo "$@" | tr '[:space:]' $'\n' | sort -u)"
|
||||||
for w in ${wordList//[[:punct:]]/} ; do
|
for w in ${wordList//[[:punct:]]/} ; do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user