Quote:
yeah but u have to look at if the $nick is already present in hash table or not


True. I should have used $addtok()...

Code:
  hadd Ndata $wildsite $addtok($hget(Ndata,$wildsite),$nick,32)


Of course, the separator can be something other than a space depending on preference.

And like I said regarding /hsave... if you never save except on exit/disconnect, you risk losing everything that happened the entire time you were online if mIRC or the computer crashes. Unless the data isn't important, that's not a good thing to have happen. For example, I'm online 24/7 and rarely get disconnected. If I store data for a week and then mIRC or the computer crashes for whatever reason (maybe power goes out or whatever), then all that data is lost. Unless you have a lot of joins (ever few seconds), there is very little issue with saving each time data is updated. Also, you can make it save only if the nick is new... if it's already there, you don't have to save. Though I'm not sure you'd really make it more efficient running the check instead of just saving it. If it really is an issue, then at minimum I would suggest a timer set to 5 or 10 minutes that runs on start to save the data at regular intervals. Of course, this means you might save more often than using the original method I showed, depending on the number of joins.

You also don't seem to like the advice about creating the table when needed rather than only on start. Loading the script without restarting mIRC would fail to load any saved data and therefore would overwrite that data with when you save. Not a good idea. As a note, it doesn't have to be an alias. It can be placed right into the on join event. I am just used to hash tables that are called in multiple ways and having an alias means no duplicated code. For this situation, having it in the event itself would work fine.


Invision Support
#Invision on irc.irchighway.net