Originally Posted By: starbucks_mafia
If you want it to store each nick only once:

Code:
on *:JOIN:#: {
  if ($read(nicks.txt, sn, $address)) {
    var %nicks = $addtok($v1, $nick, 32), %starttok = $iif($numtok(%nicks, 32) >= 14, -14, 1)
    write -l $+ $readn nicks.txt $address $gettok(%nicks,$+(%starttok, -), 32)
  }
  else { write nicks.txt $address $nick }
}


Not trying to nag you, but, that won't actually work the way you intend it to. If the nick exists, it'll only give you 14 of the nicks (not 15).

Also, lets say that "Bob" is in position 1 ($gettok(%nicks,1,32)), if the person joins as "Bob" and you use $addtok(), it won't add the nick since it's already there, and, it will remove Bob from the list since it's using -14.