From 8420a2435d547fb215e412b29c6a42807fb2d0f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Wed, 3 Mar 2021 17:22:26 +0100 Subject: [PATCH] feat(scripts): enhance pls script --- packages/scripts/playlist.sh | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/packages/scripts/playlist.sh b/packages/scripts/playlist.sh index c369203..240c74d 100755 --- a/packages/scripts/playlist.sh +++ b/packages/scripts/playlist.sh @@ -5,22 +5,41 @@ send_irc() { USER $USER $(hostname) tolmoon $USER NICK musikkritiker JOIN #the_playlist - PRIVMSG #the_playlist $* + PRIVMSG #the_playlist :$* QUIT " | nc irc.freenode.net 6667 >/dev/null } +good="what a banger +ooh i love this song +this is top notch stuff! +nice! +noice! +yesss! +cool song! +i like this +that just sounds awesome! +that's a good song! +👍" +bad="how can anyone listen to this? +(╯°□°)╯ ┻━┻ +skip this! +next, please! i'm suffering! +that's just bad music +nope +that sucks! +👎" endpoint=prism.r:8001 case "$1" in - good|like|cool|nice|yes|+) - send_irc 'nice!' & + good|like|cool|nice|noice|top|yass|yes|+) + send_irc "$(echo "$good" | shuf -n1)" & curl -sS -XPOST "$endpoint/good" ;; - skip|next|bad|sucks|no|nope|-) - send_irc 'sucks' & + skip|next|bad|sucks|no|nope|flop|-) + send_irc "$(echo "$bad" | shuf -n1)" & curl -sS -XPOST "$endpoint/skip" ;; *)