Add type guessing to annna. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit cdcd94dc07d547ba80c1da12f5ee3f23d3f0ae3e | |
parent 4ba2fdae0d40bb14952f5de64532bd7ed67566a7 | |
Author: Annna Robert-Houdin <[email protected]> | |
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(-) | |
--- | |
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: gopher… | |
;; | |
+"${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 i… | |
+ } | |
+ ;; | |
"${ircuser}, what is "*) | |
word="$(printf "%s\n" "${text}" | cut -c 16-)" | |
case "$word" in |