I'd like to alter this script to update the e-mail address, as well, however, the connect event doesn't occur until after the connection is already made, and thus, uses the previous emailaddr setting. What's the best method of scripting an update to the setting just prior to connection?

Originally Posted By: RusselB

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"
  }
}