mIRC Home    About    Download    Register    News    Help

Print Thread
#86393 11/06/04 12:11 PM
Joined: Apr 2004
Posts: 21
_
Ameglian cow
OP Offline
Ameglian cow
_
Joined: Apr 2004
Posts: 21
hi,

does anyone have an example how i can realisize that?

how can i check for an adress/nick-match?

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
$hfind(<table>,<addresst>,1,W)

This matches every item in <table> against the <address> (nick!user@host) you input and returns the first matching item. You can then use $hget() to query for its data, in case you had stored there some valueable information such as "flags" or ignore reason.

The same functionality can be achieved with mIRC's inbuilt userlist. See the help file on the following topics:
  • [color:green]/help access levels
    /help $ulist
    /help /auser

Joined: Apr 2004
Posts: 21
_
Ameglian cow
OP Offline
Ameglian cow
_
Joined: Apr 2004
Posts: 21
hi Online,

thx for u answer, just 1more question,

Quote:
This matches every item in <table> against the <address> (nick!user@host) you input and returns the first matching item


i already thougt about this, but what if i have the adress init for example:

*!blub@*.com (all idents "blub" = ignored)

so, if the user writes anything now i have to check his/her address, but how can i? i know i can overgive the full address by using $address for example, but it will not match or?

Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
In events, these identifiers are available apart from $nick:
  • $address = user[/i]@host
    $site = host
    $wildsite = *!*@host
    $fulladdress = nick!user@host
You can use the last one to check for maching ignore entries. For example,

On ^*:open:?:*:{
  • if $hfind(ignore,$fulladdress,1,W) {
    msg $nick Sorry, I do not accept messages from you. Reason: $hget(ignore,$ifmatch)
    haltdef
    }
}


Link Copied to Clipboard