Add fortune prompt to annna. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 2c0ae9b3f118a301bd866b00f355082c9f3bca1a | |
parent 567f69271f766a0519c67c761cde761bf989e615 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sun, 21 Jul 2024 20:42:17 +0200 | |
Add fortune prompt to annna. | |
Diffstat: | |
M annna-message-common | 7 +++++++ | |
1 file changed, 7 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/annna-message-common b/annna-message-common | |
@@ -335,6 +335,13 @@ case "${text}" in | |
annna-say -s "${server}" -c "${channel}" "${user}, sorry, noth… | |
fi | |
;; | |
+"${ircuser}, what is my fortune?") | |
+ fortunecookie="$(fortune-cookie)" | |
+ if [ -n "${fortunecookie}" ]; | |
+ then | |
+ annna-say -s "${server}" -c "${channel}" "${user}, ${fortuneco… | |
+ fi | |
+ ;; | |
"${ircuser}, what is "*) | |
word="$(printf "%s\n" "${text}" | cut -c 16-)" | |
case "$word" in |