Add #nospoil feature to annna. - annna - Annna the nice friendly bot. HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/ DIR Log DIR Files DIR Refs DIR Tags DIR README --- DIR commit 91d7263c59e0d51a0dcc2ddd6a6377fad91b6267 DIR parent d631072ac1dad6d80b8f6f25c88a03f96ddc75eb HTML Author: Annna Robert-Houdin <annna@bitreich.org> Date: Sun, 15 Apr 2018 21:50:04 +0200 Add #nospoil feature to annna. Diffstat: M annna-start-services | 41 +++++++++++++++++++------------ 1 file changed, 25 insertions(+), 16 deletions(-) --- DIR diff --git a/annna-start-services b/annna-start-services @@ -82,24 +82,33 @@ then uri="$(printf "%s\n" "${text}" \ | sed 's,.*\(https\{0\,1\}://[^ ]\{1\,\}\).*,\1,' \ | grep 'https\{0,1\}://[^ ]')" - if [ -n "$uri" ]; - then - urititle="$(curl-grabtitle "${uri}" \ - | tr '[:cntrl:]' ' ' \ - | sed 's@^ *@@')" - if [ -n "$urititle" ]; + case "${text}" in + *\#nospoil*) + ;; + *) + if [ -n "$uri" ]; then - case "${urititle}" in - *Gunther*) - annna-say -c "#bitreich-en" "Oh Gunther! ❤ ❤ ❤ ${urititle}" - ;; - *) - annna-say -c "#bitreich-en" "HTML title: ${urititle}" - ;; - esac + urititle="$(curl-grabtitle "${uri}" \ + | tr '[:cntrl:]' ' ' \ + | sed 's@^ *@@')" + if [ -n "$urititle" ]; + then + case "${urititle}" in + *Gunther*) + annna-say -c "#bitreich-en" "Oh Gunther! ❤ ❤ ❤ ${urititle}" + ;; + *Attention\ Required\!\ \|\ Cloudflare*) + annna-say -c "#bitreich-en" "We got clownflared: gopher://bitreich.org/0/ascii/clownflare.vt" + ;; + *) + annna-say -c "#bitreich-en" "HTML title: ${urititle}" + ;; + esac + fi + continue fi - continue - fi + ;; + esac case "${text}" in "${botname}, what is "*)