diff --git a/examples/chat/answer b/examples/chat/answer index 36cc1b7..c28a0f0 100755 --- a/examples/chat/answer +++ b/examples/chat/answer @@ -13,10 +13,6 @@ random() { cd "$(dirname "$0")" -if (grep -q -- "$1" "ignore"); then - exit 0 -fi - printf "%s" "$1: " from=$(printf "%s\n" "$1" | tr -d '$`|<>') @@ -28,7 +24,6 @@ if [[ ${#string} -gt 750 ]]; then exit 0 fi - if [[ "$string" == *http*://* ]]; then amount=$(sed -e '/https*:\/\//!d' ./frs.txt | wc -l) # Makes it a bit more human (time to find a link?). @@ -39,7 +34,7 @@ if [[ "$string" == *http*://* ]]; then cl="$(wget --spider -S "$img" 2>&1)" if [[ $(printf "%s\n" "$cl" | sed -e '/Content-Type/!d;/image\//!d') ]]; then #echo 'posting' - printf "%s\n" "$img $from" >> ../data/pictures + printf "%s\n" "$img $from" >> ./pictures.txt fi else # Exclude last two entries from the amount. diff --git a/examples/chat/pictures.txt b/examples/chat/pictures.txt new file mode 100644 index 0000000..e69de29