mirror of
https://github.com/kmein/niveum
synced 2026-03-21 20:31:07 +01:00
feat(pls): notify in irc channel
This commit is contained in:
@@ -1,12 +1,30 @@
|
|||||||
#!/bin/sh
|
#!/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
|
endpoint=prism.r:8001
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
good|like|cool|nice|yes|+)
|
good|like|cool|nice|yes|+)
|
||||||
curl -sS -XPOST "$endpoint/good";;
|
send_irc 'nice!' &
|
||||||
|
curl -sS -XPOST "$endpoint/good"
|
||||||
|
;;
|
||||||
skip|next|bad|sucks|no|nope|-)
|
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
|
esac
|
||||||
|
wait
|
||||||
|
|||||||
Reference in New Issue
Block a user