Jenkins notification script

This script tells when a build fails and when it recovers. It works with https://wiki.jenkins-ci.org/display/JENKINS/Notification+Plugin

Example output:
[2/9/13 1:27:36 PM] Hubot: STARTED FAILING: gem-wallet #380 (http://jenkins:8080/job/gem-wallet/380/)
[2/9/13 1:27:48 PM] Hubot: STILL FAILING: gem-wallet #381 (http://jenkins:8080/job/gem-wallet/381/)
[2/9/13 1:28:20 PM] Hubot: BUILD RESTORED: gem-wallet #382 (http://jenkins:8080/job/gem-wallet/382/)