mIRC Home    About    Download    Register    News    Help

Print Thread
#201094 19/06/08 02:19 PM
Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Hi all,

quick question for you,

how do you check to see wether or not a hash table exists or not and if it does exist I would like to clear all the data in there.

Thanks a bunch

Cheers

Jay

Joined: Nov 2007
Posts: 19
J
Pikka bird
Offline
Pikka bird
J
Joined: Nov 2007
Posts: 19
$hget(Table) would return the table name if it is true, or if it doesn't exist, it'll return $null.

You could use if ($hget(Table)) .hfree Table

Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Thanks for the quick reply.

Cheers,

Jay

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Just remember that using the /hfree command not only removes the data from the table, but it also removes the table from memory, so you need to re-create it before you use it again.

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
You have two choices here. You can either use /hdel to only delete the item and data, which retains the hash table, or use /hadd -m to re-make your hash tables. Also, there are addons out there that you can install to check, edit and delete your hash tables at ease.

Last edited by Tomao; 20/06/08 09:12 AM.

Link Copied to Clipboard