Ok, I've seen numerous amounts of these upon searching for them, but most of which I use don't seem to work for me or have too many options/dialoges etc... So I just threw something extremely simple up..
All you need to do is replace "Server" with your choice of server, replace "Nick" with your nickname and under "Password" put in your password.. Very simple to use, just paste into a new remote file and this can be edited for numerous servers. You can also delete the join at the end if you like.
on *:connect { if ("Server" isin $server && $me = "Nick") { ns identify "Password" | join #main } }