Couldn't get to work.
Final release of the script is
Here
If anyone wants to have a crack at this, be my guest.
One other bug i had found was, when you block all/unblock all and then try to change your status it sometimes doesn't change and other times does after a minute or so.
Not sure what that could be.