mIRC Home    About    Download    Register    News    Help

Print Thread
#49730 16/09/03 12:06 PM
Joined: Sep 2003
Posts: 2
Z
Zimeon Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Z
Joined: Sep 2003
Posts: 2
Ok, so this is basicly my little problem here that i've been unable to solve sofar. I'm scripting a bot which can handle accounts.

if (($hget(register,address. $+ $hmatch($+ $chan $+,channel.*.voice,w) $+) == $address)) { mode $chan +v $nick }

Basicly the problem is that the $hmatch won't search through the register hash file for a mathcing username&address. To be honest i'm not entierly sure how $hmatch works.

The * in channel.*.voice is the accountname. Hope this is clear enough what i'm trying to do =) The command works so don't wonder about the stuff before it.

ta

Last edited by Zimeon; 16/09/03 12:10 PM.
Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
Just a suggestion to try $ifmatch instead of $hmatch

I looked in the Mirc 6.1 help file and the reffrance to $hmatch is not in the help file.




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
How do you add items to register hashtable?


Code:
//if ( khaled isgod ) echo yes | else echo no
Joined: Sep 2003
Posts: 2
Z
Zimeon Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
Z
Joined: Sep 2003
Posts: 2
When u login it adds the following line. Eg. login zimeon password

hadd register address. $+ $2 $address

---------

What did u mean with $ifmatch ?

Last edited by Zimeon; 16/09/03 05:04 PM.
Joined: Jan 2003
Posts: 150
J
Vogon poet
Offline
Vogon poet
J
Joined: Jan 2003
Posts: 150
from versions.txt

since mIRC v6.02

86.Extended $hfind(name/N, text, N, M) to handle wildcard/regex
matches. Where M is:

n - normal text comparison (default if M isn't specified)
w - text is wildcard text
W - hash table item/data is wildcard text
r - text is regular expression
R - hash table item/data is regular expression

Note: $hmatch() and $hregex() are still supported for now but
are no longer listed in the help file.


Go ahead, jump. 100,000 lemmings can't be wrong.
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
you also have hashtables named after channels?
if ( $hget( $chan , $+( channel. , $gettok( $hfind(register,$address,1).data , 2 , 44 ) , .voice ) ) == ??? )

So it has to be something along these lines....


Code:
//if ( khaled isgod ) echo yes | else echo no

Link Copied to Clipboard