Improve the sauna. Add PONG reaction for sauna. - 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 dbf670f11dd7334d5601ec3fa33218f1258d7da6
(DIR) parent c2221c5fabd145801bed39794a4c7996938ae744
(HTM) Author: Annna Robert-Houdin <annna@bitreich.org>
Date: Mon, 13 Jul 2026 13:42:11 +0200
Improve the sauna. Add PONG reaction for sauna.
Diffstat:
M annna-channel-service | 5 -----
M annna-message-sauna | 16 ++++++++++++----
M annna-start-server | 8 +++++++-
3 files changed, 19 insertions(+), 10 deletions(-)
---
(DIR) diff --git a/annna-channel-service b/annna-channel-service
@@ -3,11 +3,6 @@
case "${IRC_SERVER}" in
*bitreich.org)
case "${IRC_CHANNEL}" in
- \#bitreich-idle)
- export SERVICE_BASE="${ANNNA_MODBASE}/idlerpg"
- # TODO: Fix idle service for new architecture.
- ${SERVICE_BASE}/idlerpg-channel-service.py &
- exit;;
\#bitreich-radio)
[ -n "$(pgrep -f radio-channel-service.sh)" ] && exit
export SERVICE_BASE="${ANNNA_MODBASE}/radio"
(DIR) diff --git a/annna-message-sauna b/annna-message-sauna
@@ -1,4 +1,4 @@
-#!/bin/sh -e
+#!/bin/bash -e
[ "$IRC_CMD_USER" = "${IRC_USER}" ] && exit
@@ -7,9 +7,17 @@ JOIN) annna-say "Welcome ${IRC_CMD_USER}! Please grab a towel and have fun!";;
PART) annna-say $'\001ACTION puts the towel in the laundry.\001';;
PRIVMSG)
case "${IRC_PRIVMSG_TEXT}" in
- "${IRC_USER}, please give me a towel"*)
- annna-say "$(echo -e '\001')ACTION gives ${IRC_CMD_USER} a towel.$(echo -e '\001')"
- ;;
+ "${IRC_USER}, please give me a towel"*) annna-say "$(echo -e '\001')ACTION gives ${IRC_CMD_USER} a towel.$(echo -e '\001')";;
+ "${IRC_USER}, please add some aroma"*) annna-say $'\001ACTION pours an aromatic infuion in the sauna.\001';;
+ "${IRC_USER}, please pour some water"*) annna-say $'\001ACTION pours water on the stones.\001';;
+ "${IRC_USER}, please clean the sauna"*) annna-say $'\001ACTION cleans the sauna.\001';;
+ esac;;
+PONG)
+ action=$(($RANDOM % 20))
+ case "${action}" in
+ 2) annna-say $'\001ACTION pours an aromatic infuion in the sauna.\001';;
+ 4|5) annna-say $'\001ACTION pours water on the stones.\001';;
+ 13) annna-say $'\001ACTION cleans the sauna.\001';;
esac;;
esac
(DIR) diff --git a/annna-start-server b/annna-start-server
@@ -179,7 +179,13 @@ do
"PING");;
"NICK");;
- "PONG");;
+ "PONG")
+ pongchannels="#bitreich-sauna";
+ for c in $pongchannels;
+ do
+ export IRC_CHANNEL="${c}"
+ annna-channel-message
+ done;;
"QUIT");;
"KICK");;
"MODE");;