How about just using the mIRC options dialog?

alt-o -> Connect > Options -> check 'Reconnect on disconnection'
Also check out the Retry... button in there