Just for the heck of it, I did some checking, and on all of the networks that I'm on, I was unable to set a new password without previously having been identified for my nick with the old password. Therefore this script would not really do anything, since nickserv requires the person trying to change the password to have identified for their nick previously.