Implement radio listener count. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 58da3de74532ae89ccc1456b21b2db098a56784e | |
parent 487e2c7dbe61f128fab6dab03fb4cde43003c666 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Mon, 26 Aug 2024 20:59:27 +0200 | |
Implement radio listener count. | |
Diffstat: | |
M annna-message-radio | 12 ++++++------ | |
1 file changed, 6 insertions(+), 6 deletions(-) | |
--- | |
diff --git a/annna-message-radio b/annna-message-radio | |
@@ -22,22 +22,23 @@ case "${text}" in | |
"${ircuser}, please toggle single.") /usr/bin/mpc -q single; exit;; | |
"${ircuser}, please toggle consume.") /usr/bin/mpc -q consume; exit;; | |
"${ircuser}, please rescan.") /usr/bin/mpc -q rescan; exit;; | |
+"${ircuser}, how many people listen to the radio?") | |
+ annna-say -s "${server}" -c "${channel}" "${user}, $(/br/bin/bitreich-… | |
+ exit;; | |
"${ircuser}, please radio play "*) | |
url="$(printf "%s\n" "${text}" | cut -c 25- | sed 's,\t, ,g')" | |
{ | |
ytdl-mpd -a -m -q "$url" | |
annna-say -s "${server}" -c "${channel}" "Your download ${url}… | |
} & | |
- exit | |
- ;; | |
+ exit;; | |
"${ircuser}, please radio say "*) | |
word="$(printf "%s\n" "${text}" | cut -c 25- | sed 's,\t, ,g')" | |
{ | |
printf "%s\n" "${word}" | bitreich-radio-speak | |
annna-say -s "${server}" -c "${channel}" "The speech is done." | |
} & | |
- exit # no common messages | |
- ;; | |
+ exit;; | |
"${ircuser}, please stop speaking on radio.") | |
if pkill -f bitreich-radio-speak >/dev/null 2>&1; | |
then | |
@@ -45,8 +46,7 @@ case "${text}" in | |
else | |
annna-say -s "${server}" -c "${channel}" "${user}, sorry, no i… | |
fi | |
- exit # no common messages | |
- ;; | |
+ exit;; | |
esac | |
annna-message-common "${server}" "${channel}" "${user}" "${text}" |