I would recommend including previous nicks when adding new ones so that you keep a record of all nicks:

Code:
hadd -m Ndata $wildsite $hget(Ndata,$wildsite) $nick


I also really recommend saving when you change data in hash tables rather than only when you exit. Otherwise, you lose all changes if mIRC crashes. Unless the data isn't important, of course. It's also not a bad idea to include a hash table "size" when creating it as it speeds up access. Also, it can be a good idea to have an alias that checks for the saved data and loads it and creates the table anytime you want to add data rather than only on start. If someone were to load the script and start using it without restarting mIRC, the saved data wouldn't get loaded and would end up being overwritten (lost) when exiting.

Here's how I think I'd handle it.

Code:
on !*:join:#channel:{
  Ndata.check
  if ($hget(Ndata,$wildsite)) echo 3 -a $nick was $v1
  hadd Ndata $wildsite $hget(Ndata,$wildsite) $nick
  hsave Ndata nick.data
}
alias Ndata.check {
  if (!$hget(Ndata)) {
    hmake Ndata 100
    if $isfile(nick.data) { hload Ndata nick.data }
  }
}


And to the OP, the echo line is completely optional... a way to view it inside mIRC wasn't requested, so that can be removed if desired or formatted differently or whatever else.

To view the data, open the nick.data file in Wordpad or Word (not Notepad). You'll see a host line followed by all nicks attached to that host, then another host line with the nicks for that one, and so on.

Be aware that there is a limit to the number of nicks you can attach to a host (the character length of them). Chances are that you won't hit that limit on any one host because people don't usually change their nicks that much. But, if you think you will, then you'll want to use binary instead for the hash table.


Invision Support
#Invision on irc.irchighway.net