Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix annna picking service. - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 6428e3fa3538a9c3272ff1f78712d464439fc99c
parent ad3d737f0390763d9a9c060f0bb139d3779863d4
Author: Annna Robert-Houdin <[email protected]>
Date: Sun, 17 Oct 2021 21:29:37 +0200
Fix annna picking service.
Diffstat:
M annna-message-common | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/annna-message-common b/annna-message-common
@@ -768,6 +768,15 @@ case "${text}" in
"${botname}, please give me a penis extension.")
annna-say -c "${channel}" "${user}, here: $(penis-extension)"
;;
+"${botname}, please pick one of: "*)
+ pick="$(printf '%s\n' "${text}" \
+ | sed 's/.*please pick one of: //' \
+ | tr ',' '\n' \
+ | tr -d ' ' \
+ | sort -R \
+ | head -n 1)"
+ annna-say -c "${channel}" "${user}, I think ${pick} is the best option…
+ ;;
"${botname}, please amsterdamify #"*|\
"${botname}, please banjo #"*|\
"${botname}, please bounce #"*|\
@@ -814,10 +823,6 @@ case "${text}" in
} &
exit 0
;;
-"${botname}, please pick one of: ")
- pick="$(printf '%s\n' "${text}" | sed 's/.*please pick one of://' | tr…
- annna-say -c "${channel}" "${user}, I think ${pick} is the best option…
- ;;
"${botname}, please help.")
# Help Message.
# TODO: Add multiple line support to annna-say -c(1) with sleep.
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.