Outsource trick or treat to script. - annna - Annna the nice friendly bot.
HTML git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/annna/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
---
DIR commit ce06d14c8efe69963aa29e3e442a2ecfd9b7a00e
DIR parent 4b4fe8d6ccb2428b60fe492d06065f126c97bc8c
HTML Author: Annna Robert-Houdin <annna@bitreich.org>
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(-)
---
DIR 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 are so kind. Here is a candy: ${candy}"
- ;;
- 0)
- annna-say -s "${server}" -c "${channel}" "${user}, BOO! ༼ つ ╹ ╹ ༽つ Did I scare you? Here's a spooky treat: $(boo)"
- ;;
- esac
+ annna-say -s "${server}" -c "${channel}" "${user}, $(trick-or-treat)"
} &
;;
"${ircuser}, please dance with me.")
DIR 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 treat: $(boo)"
+ ;;
+esac
+