@ whoever is interested:


How about something like this:
Code:
on *:snotice:*did a /whois on you*:{
  var %nick = $2
  set -u6 %ghlist $addtok(%ghlist,%nick,44)
  .userhost %nick
}

raw 302:*:{
  ; REGEX: (nick)(*=+-)(ident)@(host)
  if ($regex(gh,$2-,/([^*=+]+)([*=+]+)([^*=+]+)@([^*=+]+)/)) {
    if (!$istok(%ghlist,$regml(gh,1),44)) return
    set -u8 %ghlist $remtok(%ghlist,$regml(gh,1),1,44)
    if (* isin $regml(gh,2)) return
    inc -u[color:red]10[/color] $+(%,whois.,$regml(gh,4))
    if ($($+(%,whois.,$regml(gh,4)),2) > 4) { kill $regml(gh,1) Do not /whois me that many times }
    echo 3 -a $regml(gh,1) ( $+ $regml(gh,3) $+ @ $+ $regml(gh,4) $+ ) has /whois'd you $($+(%,whois.,$regml(gh,4)),2) times
  }
  halt
}


This code will keep track of how many times you are /whois'd from the same hostmask (doesn't consider ident at all). If you are /whois'd more than 4 times from the same hostmask, the last person to perform the /whois will be killed. IRCOps are always ignored (it's not a good idea to go killing other IRCOps :tongue: ).

You can adjust how fast the users must /whois you in order to be counted. If the user does a /whois on you with less than 10sec between each /whois, the count will be maintained.

If you want to use the values of the userhost command, they are as follows:

$regml(gh,1) = nick
$regml(gh,2) = *+- (* = IRCOp, + = here, - = away)
$regml(gh,3) = ident (before the @)
$regml(gh,4) = hostmask (after the @)

-genius_at_work