A few updates, cleanup updated weather module.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
# All names to match are completely lowercase.
|
||||
exitName="${1%% *}"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
# All names to match are completely lowercase.
|
||||
case "${1,,}" in
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
|
||||
who="${1%!*}"
|
||||
@@ -66,7 +67,7 @@ keywords[vim]="msg \"$chan\" \"$(shuf -n1 -e \
|
||||
wordList="$(echo "${@,,}" | tr '[:space:]' $'\n' | sort -u)"
|
||||
for w in ${wordList//[[:punct:]]/} ; do
|
||||
if [[ -n "${keywords[${w,,}]}" && "$lastWordMatch" != "${keywords[${w,,}]}" ]]; then
|
||||
eval ${keywords[${w,,}]}
|
||||
eval "${keywords[${w,,}]}"
|
||||
lastWordMatch="${keywords[${w,,}]}"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
[ -f functions.sh ] && source functions.sh
|
||||
|
||||
# Dependencies required by this trigger
|
||||
dependencies=("curl" "w3m" "sed")
|
||||
|
||||
# Silently skip if dependencies are missing (triggers shouldn't error in channel)
|
||||
if ! check_dependencies "${dependencies[@]}" &> /dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for l in $3 ; do
|
||||
text="${l#:}"
|
||||
if [[ "${text}" =~ http://|https://|www\..* ]]; then
|
||||
|
||||
Reference in New Issue
Block a user