It doesn't?
/msg nickserv identify mypassword
Your script:
/msg #currentchan /msg nickserv identify mypassword


Yea I don't see any problems there!