Add stupid love game to annna. - annna - Annna the nice friendly bot.
(HTM) git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Tags
(DIR) README
---
(DIR) commit e349aa5f4c2a35dc72f8be2956a27138d7a3cafe
(DIR) parent 26fee0de6012de8a100cbc1eea49331c2a4d7025
(HTM) Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sun, 19 Apr 2020 21:40:29 +0200
Add stupid love game to annna.
Diffstat:
M annna-start-services | 14 ++++++++++++++
1 file changed, 14 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/annna-start-services b/annna-start-services
@@ -231,6 +231,20 @@ then
fi
annna-say -c '#bitreich-en' "${purl}"
;;
+ "${botname}, are "*)
+ case "${text}" in
+ *" in love?")
+ words="$(printf "%s\n" "${text}" | sed 's,.*are \(.*\) and \(.*\) in love?,\1 \2,')"
+ lovedistance="$(printf "%s * 100\n" "$(fstrcmp ${words})" | bc | cut -d'.' -f 1)"
+ if [ $lovedistance -gt 15 ];
+ then
+ annna-say -c '#bitreich-en' 'Yes!!! Pure <3 <3'
+ else
+ annna-say -c '#bitreich-en' "No."
+ fi
+ ;;
+ esac
+ ;;
esac
case "${text}" in