Introduction
Introduction Statistics Contact Development Disclaimer Help
Implement sleeping and waking up in annna. - annna - Annna the nice friendly bo…
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 669a884c52e6eb2f530adfd2b949262d8305940f
parent 58da3de74532ae89ccc1456b21b2db098a56784e
Author: Annna Robert-Houdin <[email protected]>
Date: Mon, 26 Aug 2024 21:05:40 +0200
Implement sleeping and waking up in annna.
Diffstat:
M annna-message-common | 8 ++++++++
M annna-say | 1 +
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/annna-message-common b/annna-message-common
@@ -1631,6 +1631,14 @@ done
[ $ismember -lt 1 ] && exit
case "${text}" in
+"${ircuser}, please go to sleep.")
+ annna-say -s "${server}" -c "${channel}" "Going to sleep ... Zzzz ..."
+ touch "${ircbase}/annna-is-sleeping"
+ ;;
+"${ircuser}, please wake up.")
+ rm -f "${ircbase}/annna-is-sleeping"
+ annna-say -s "${server}" -c "${channel}" "Good morning BITREICH!"
+ ;;
"${ircuser}, can you show me the uptime please?")
annna-say -s "${server}" -c "${channel}" "$(hostname) uptime: $(uptime…
;;
diff --git a/annna-say b/annna-say
@@ -46,6 +46,7 @@ shift $(expr $OPTIND - 1)
# If annna is not alive, do not bother.
annna-alive || exit 0
+[ -e "${ircbase}/annna-is-sleeping" ] && exit 0
for c in $channels;
do
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.