Just as an aside and an opinion. I use hash tables a lot and I never use hfind. I create my hash tables to return information directly.

For instance, I choose the most common denominator for the item. Take user managment. On some servers the nick will never change, on others you can grab a persons IP. On my server we use a gatekeeper address assigned by the server.

I know they can change their nick and everything, but that account will always have the same gatekeeper, so I set the item as the gatekeeper.

hadd table gatekeeper data

So now, $hget(table,$address) returns all data I collected on the user. I save all the data in the same order so I can use $gettok or something to choose what I want from the data.

The point I am trying to make is that I design my tables to be accessed quickly and easily. I think there is a value in considering this tactic.

I'm not saying there is anything wrong with $hfind, I just consider directly calling the item in the hash table a bit faster and less work for mIRC.

Edit: Sorry this wasn't a reply to Russelb in particular, it was in response for the request to search for wildcards in a hash table.

Last edited by DJ_Sol; 03/12/08 04:26 AM.