More mpc commands to annna. - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 8a94a9d1188d3cb91251ef2bbe2f73a2df0f680b | |
parent 41ec9fc9977fde61417488d0746553f50ec34288 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sat, 10 Aug 2024 11:25:16 +0200 | |
More mpc commands to annna. | |
Diffstat: | |
M annna-message-radio | 19 +++++++------------ | |
1 file changed, 7 insertions(+), 12 deletions(-) | |
--- | |
diff --git a/annna-message-radio b/annna-message-radio | |
@@ -13,18 +13,13 @@ text="$4" | |
[ "$user" = "${ircuser}" ] && exit | |
case "${text}" in | |
-"${ircuser}, next song please.") | |
- /usr/bin/mpc -q next | |
- exit # no common messages | |
- ;; | |
-"${ircuser}, please shuffle.") | |
- /usr/bin/mpc -q shuffle | |
- exit # no common messages | |
- ;; | |
-"${ircuser}, please toggle random.") | |
- /usr/bin/mpc -q random | |
- exit # no common messages | |
- ;; | |
+"${ircuser}, next song please.") /usr/bin/mpc -q next; exit;; | |
+"${ircuser}, prev song please.") /usr/bin/mpc -q prev; exit;; | |
+"${ircuser}, please shuffle.") /usr/bin/mpc -q shuffle; exit;; | |
+"${ircuser}, please toggle random.") /usr/bin/mpc -q random; exit;; | |
+"${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}, please radio play "*) | |
url="$(printf "%s\n" "${text}" | cut -c 25- | sed 's,\t, ,g')" | |
{ |