You could simply script this method like I do:

on 1:connect: {
echo Network Name: $network
if ($network = NameFromAbove) { /Ghost <Nick1> <Pass1> }
if ($network = Network2) { /Ghost <Nick2> <Pass2> }
}
alias ghost { /NickServ Ghost $1 $2 | /Nick $1 | /NickServ Identify $2 }
alias release { /NickServ Release $1 $2 | /Nick $1 | /NickServ Identify $2 }

Then if you do connect and your nickname is locked by services, simply use /RELEASE <nick> <pass> and it will automatically do what it needs.