Yes.

The method I use, is to store the information in a custom ini file, although there may (and probably are) other options.

An example from my ini file:
Quote:

[network1]
mnick = main nick
anick = alt nick
password = password


The I use the following script
Code:
on *:connect:{
  if $ini(connections.ini,$network) {
    .mnick $readini(connections.ini,n,$network,mnick)
    .anick $readini(connections.ini,n,$network,anick)
  }
}
on ^*:notice:*This nickname is registered and protected.*:*:{
  if ($nick == nickserv) {
    .msg nickserv $readini(connections.ini,n,$network,password)
  }
  haltdef
}
on *:disconnect:{
  if !$ini(connections.ini,$network) {
    .writeini -n connections.ini $network mnick $mnick
    .writeini -n connections.ini $network anick $anick
    .writeini -n connections.ini $network password $$?="Enter nickserv password for $network"
  }
}

Additionally the /server command will allow you to specify the main and alternate nicks using the -i switch

See /help /server for more details.