Numnastics now posts to GNU Social instead of Twitter.

This commit is contained in:
Storm Dragon 2015-04-26 21:20:04 -04:00
parent 58ad87a5bb
commit 6ca4a3a95e

View File

@ -64,10 +64,10 @@ if [ $oldHighScore -ne 0 ] ; then
fi fi
if [ $tries -lt $oldHighScore -o $oldHighScore -eq 0 ] ; then if [ $tries -lt $oldHighScore -o $oldHighScore -eq 0 ] ; then
echo "$tries" > .numnastics-score echo "$tries" > .numnastics-score
read -n 1 -p "You have set a new record! Would you like to post this score to Twitter using TTYtter? " answer read -n 1 -p "You have set a new record! Would you like to post this score to GNU Social? " answer
if [ "${answer^}" == "Y" ] ; then if [ "${answer^}" == "Y" ] ; then
check_dependancies ttytter read -p "Enter your webfinger, e.g. storm@social.stormdragon.tk: " answer
ttytter -readline=0 -silent -status="I just beat #numnastics in $tries moves! $(if [ $oldHighScore -ne 0 ] ; then echo "This is $(($oldHighScore - $tries)) fewer moves than my previous record!";fi)" &> /dev/null & curl --connect-timeout 60 -s -u "${answer%@*}" -d status="I just beat #numnastics in $tries moves! $(if [ $oldHighScore -ne 0 ] ; then echo "This is $(($oldHighScore - $tries)) fewer moves than my previous record of ${oldHighScore}!";fi)" -d source="Numnastics" https://${answer#*@}/api/statuses/update.xml &> /dev/null&
fi fi
fi fi
play -qV0 sounds/win.ogg play -qV0 sounds/win.ogg