mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
feat(pls): notify in irc channel
This commit is contained in:
@@ -1,12 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
send_irc() {
|
||||
echo "
|
||||
USER $USER $(hostname) tolmoon $USER
|
||||
NICK musikkritiker
|
||||
JOIN #the_playlist
|
||||
PRIVMSG #the_playlist $*
|
||||
QUIT
|
||||
" | nc irc.freenode.net 6667 >/dev/null
|
||||
}
|
||||
|
||||
|
||||
|
||||
endpoint=prism.r:8001
|
||||
|
||||
case "$1" in
|
||||
good|like|cool|nice|yes|+)
|
||||
curl -sS -XPOST "$endpoint/good";;
|
||||
send_irc 'nice!' &
|
||||
curl -sS -XPOST "$endpoint/good"
|
||||
;;
|
||||
skip|next|bad|sucks|no|nope|-)
|
||||
curl -sS -XPOST "$endpoint/skip";;
|
||||
send_irc 'sucks' &
|
||||
curl -sS -XPOST "$endpoint/skip"
|
||||
;;
|
||||
*)
|
||||
curl -sS -XGET "$endpoint/current" | jq;;
|
||||
curl -sS -XGET "$endpoint/current" | jq
|
||||
;;
|
||||
esac
|
||||
wait
|
||||
|
||||
Reference in New Issue
Block a user