Using On Notice as userbingeek as done, is a far superior method of identify than using on connect with a timer. The on notice event will keep you identified in all instances, because it is triggered directly by the request from nickserv.
Mine is similar and it has never failed me

on 1:NOTICE:*NickServ IDENTIFY*:?: {
if ($nick == Nickserv && $network == MindForge) { msg nickserv identify %mindforge.password | nick Yoda | hs on }
if ($nick == Nickserv && $network == NoWayBack) { msg nickserv identify %nowayback.password | nick Yoda | hs on }
if ($nick == Nickserv && $network == WyldRyde) { msg nickserv identify %WyldRyde.password }
if ($nick == Nickserv && $network == Abjects) { msg nickserv identify %abjects.password | nick Yoda | hs on }
}
I also use mine to trigger a nick change and a call to hostserv
