Add type guessing 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 cdcd94dc07d547ba80c1da12f5ee3f23d3f0ae3e DIR parent 4ba2fdae0d40bb14952f5de64532bd7ed67566a7 HTML Author: Annna Robert-Houdin <annna@bitreich.org> Date: Fri, 15 Sep 2023 14:25:57 +0200 Add type guessing to annna. Diffstat: M annna-message-common | 9 +++++++++ 1 file changed, 9 insertions(+), 0 deletions(-) --- DIR diff --git a/annna-message-common b/annna-message-common @@ -292,6 +292,15 @@ case "${text}" in "${ircuser}, how can I phlog on bitreich?") annna-say -s "${server}" -c "${channel}" "${user}, please read: gophers://bitreich.org/0/usr/20h/phlog/2017-08-26T20-04-02-482296.md and gophers://bitreich.org/0/usr/20h/phlog/2017-08-26T20-27-40-281825.md" ;; +"${ircuser}, what is my type?") + { + cd /br/gopher + usertype="$(find memecache/type-?.png -type f \ + | shuf -n 1 \ + | xargs -n 1 printf "gophers://bitreich.org/9%s\n")" + annna-say -s "${server}" -c "${channel}" "${user}, your type is ${usertype}" + } + ;; "${ircuser}, what is "*) word="$(printf "%s\n" "${text}" | cut -c 16-)" case "$word" in