Add annna birthday functions. - 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 03b22d3a4bf08feb327c0c98b3c63c3e222e6378
(DIR) parent 3eb9bfcd9515bf66770cb7324542b0b9a28bb852
(HTM) Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Sat, 7 Dec 2024 22:47:12 +0100
Add annna birthday functions.
Thanks pazz0 for the hint.
Diffstat:
M annna-message-common | 8 ++++++++
1 file changed, 8 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/annna-message-common b/annna-message-common
@@ -18,6 +18,7 @@ channel="$2"
user="$3"
text="$4"
annnasumerian="𒈹"
+annnabirthday="1989-05-18"
hashtags() {
cat ${hashtagfile} 2>/dev/null
@@ -306,6 +307,13 @@ case "${text}" in
done
annna-say -s "${server}" -c "${channel}" "${user}${finalexclamation}"
;;
+"${ircuser}, how old are you?")
+ age="$(ddiff ${annnabirthday} today -f "%y")"
+ annna-say -s "${server}" -c "${channel}" "${user}, I am ${age} years old."
+ ;;
+"${ircuser}, when is your birthday?")
+ annna-say -s "${server}" -c "${channel}" "${user}, I am born on ${annnabirthday}."
+ ;;
"${ircuser}, woop")
# Using the same database for funny hacks.
exclamation="$(printf "%s\n" "${text}" | sed "s;${ircuser}, \(.\);\1;g")"