Outsource trick or treat to script. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit ce06d14c8efe69963aa29e3e442a2ecfd9b7a00e | |
parent 4b4fe8d6ccb2428b60fe492d06065f126c97bc8c | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Thu, 31 Oct 2024 19:53:54 +0100 | |
Outsource trick or treat to script. | |
Diffstat: | |
M annna-message-common | 14 +------------- | |
A trick-or-treat | 18 ++++++++++++++++++ | |
2 files changed, 19 insertions(+), 13 deletions(-) | |
--- | |
diff --git a/annna-message-common b/annna-message-common | |
@@ -1183,19 +1183,7 @@ case "${text}" in | |
fi | |
sleep $sleeptime | |
- case "$(( $RANDOM % 2 ))" in | |
- 1) | |
- case "$(( $RANDOM % 3 ))" in | |
- 0) candy="🍬";; | |
- 1) candy="🍭";; | |
- 2) candy="🍫";; | |
- esac | |
- annna-say -s "${server}" -c "${channel}" "${user}, you… | |
- ;; | |
- 0) | |
- annna-say -s "${server}" -c "${channel}" "${user}, BOO… | |
- ;; | |
- esac | |
+ annna-say -s "${server}" -c "${channel}" "${user}, $(trick-or-… | |
} & | |
;; | |
"${ircuser}, please dance with me.") | |
diff --git a/trick-or-treat b/trick-or-treat | |
@@ -0,0 +1,18 @@ | |
+#!/bin/sh | |
+ | |
+export PATH="/home/annna/bin:$PATH" | |
+ | |
+case "$(( $RANDOM % 2 ))" in | |
+1) | |
+ case "$(( $RANDOM % 3 ))" in | |
+ 0) candy="🍬";; | |
+ 1) candy="🍭";; | |
+ 2) candy="🍫";; | |
+ esac | |
+ printf "you are so kind. Here is a candy: ${candy}" | |
+ ;; | |
+0) | |
+ printf "BOO! ༼ つ ╹ ╹ ༽つ Did I scare you? Here's a spooky t… | |
+ ;; | |
+esac | |
+ |