I'm late, but yes.
Code:
alias savenicks {
  var %i = 1
  while ( $nick($1,%i) ) {
    if ($ifmatch != $me) { write nicks.txt $ifmatch }
    inc %i
  }
}

or..
Code:
alias savenicks {
  var %i = 1
  while ( $nick($1,%i) ) {
    write nicks.txt $ifmatch
    inc %i
  }
  write -ds $+ $me nicks.txt
}


You can choose any of both, but be sure to read the help file for both regardless of the one you choose.


* cold edits his posts 24/7