Module and trigger updates and fixes.

This commit is contained in:
Storm Dragon 2016-09-08 12:16:59 -04:00
parent 37ee1352fd
commit 6580610e29
4 changed files with 8 additions and 5 deletions

View File

@ -6,6 +6,7 @@ phrases=(
"damn!"
"fuck the fucking fuckers!"
"fuck!"
"fuck. fuck. fuck. Mother mother fuck. Mother mother fuck fuck. Mother fuck mother fuck. Noise noise noise."
"god damn it!"
"motherfucker"
"shit, piss, fuck, cunt, cocksucker, motherfucker, and tits."

View File

@ -6,6 +6,8 @@ chan="$1"
shift
#get the lyric text into a variable
trackName="${@//:/ - }"
# Try to work around some common tags that will fail to find lyrics.
trackName="${trackName/ - live/}"
curl="$(command -v curl)"
trackName="$(echo "$trackName" | sed -e "s/ /_/g" -e 's/([[:print:]]*)//g' -e "s/['\/\.]//g" -e 's/&/and/g' -e 's/ö/o/g')"
artist="$(echo "${trackName,,}" | cut -d "-" -f 1 | sed -e 's/_$//' -e 's/^the_\(.*\)/\1_the/')"

View File

@ -9,8 +9,8 @@ shift
# the variable $chan contains the channel that caused the trigger.
# the variable $who contains the nick that caused the trigger.
declare -A keywords
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 $(shuf -n1 -e "have fun" "make chicks" "lay it like an egg") ALL NIGHT LONG!!!\""
keywords[linux]="msg \"$chan\" \"Linux is $(shuf -n1 -e awesome God great wonderful)!\""
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 $(shuf -n1 -e "have fun" "make chicks" "lay it like an egg" "put my beak where it don't belong") ALL NIGHT LONG!!!\""
keywords[dragonforce]="msg \"$chan\" \"$who: I love DragonForce!!!\""
wordList="$(echo "${@,,}" | tr '[:space:]' $'\n' | sort -u)"

View File

@ -2,11 +2,11 @@
curl="$(command -v curl)"
for l in $3 ; do
if [[ "$l" =~ http://|https://|www\.*.* ]]; then
pageTitle="$($curl -Ls "${l/#:/}" | grep "<title>" | html2text | tr '[:space:]' ' ')"
if [[ "${l#:}" =~ http://|https://|www\.*\.* ]]; then
pageTitle="$($curl -Ls "${l#:}" | grep "<title>" | html2text | tr -s '[:space:]' ' ')"
shortLink="${l#*://}"
shortLink="${shortLink%%/*}"
if ! [[ "$pageTitle" =~ \ + ]]; then
if [ ${#pageTitle} -gt 1 ]; then
msg "$2" "$pageTitle at $shortLink"
fi
fi