$hmatch() returns the item name (which you could find out by putting an /echo $hmatch() anywhere in the code, /echo is useful like that). So you just need to get the data: $hget(blacklist,$v1)
Code:
on @*:join:#: {
  if ($hfind(blacklist,$fulladdress)) {
    ban -k # $nick 2 Blacklisted: $hget(blacklist,$v1)
  }
}

Notice 4 things:

1. $hfind() is used instead of $hmatch. The latter is the 'old' version (deprecated) so better use the new one.
2. $fulladdress replaces $address($nick,5). The former doesn't depend on the IAL, it just uses the address included in the JOIN message that triggers the on JOIN event. Yours would have worked here too (assuming your IAL is on, which it should be) but it's a bit 'cleaner' and slightly more efficient to use the remote identifier $fulladdress.
3. /ban and /kick is combined into /ban -k
4. $v1 -which returns the first parameter of the last /if statement- is used instead of repeating $hmatch(). Of course, since the entire item name is the address, you could have used $hget(blacklist,$fulladdress) but $v1 is shorter.

The 4th item gives us an idea though: instead of searching the hash table, you can just aim for the specific item (the address) and see if it's there:
Code:
on @*:join:#: {
  if ($hget(blacklist,$fulladdress) != $null) {
    ban -k # $nick 2 Blacklisted: $v1
  }
}
This solution is faster. The only reason you might prefer the first is in case you have an empty reason for a particular address.

Last edited by qwerty; 09/12/05 10:27 PM.

/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com