mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Hello,

I wanted to know and find out how to search for data in a hash table.

lets say I have a table name of IPINFO

(Item) (Data)
Nickname1 *!5f67d56b2beb4a8b8ff3433eea054532@*,99.246.59.30

Lets say I say $search(99.246.59.30) it would echo to me, 99.246.59.30 belongs to Nickname1

or lets say if I say $search(*!5f67d56b2beb4a8b8ff3433eea054532@*) belongs to Nickname1

How do I go about doing this or can it even be done?

Thanks a bunch

Cheers

Joined: Sep 2008
Posts: 62
_
Babel fish
Offline
Babel fish
_
Joined: Sep 2008
Posts: 62
Busted. I knew you weren't getting these ideas from the help file.

Joined: Oct 2007
Posts: 214
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Oct 2007
Posts: 214
Thanks Memo for the help!

I guess I answered my own question.

Code:
alias test1 {
  var %x = $hfind(ipinfo,*,0,w).data
  while (%x) {
    var %f = $hfind(ipinfo,* $+ $1 $+ *,%x,w).data 
    if (%f) { echo -a Match Found $1 belongs to $hfind(ipinfo,* $+ $1 $+ *,%x,w).data }
    dec %x
  }
}



Link Copied to Clipboard