Mass Whois Punishment

By [DX] on Nov 25, 2008

Copy code to remote (Alt + R).

Code requires IRCop Status with umode for whois (+W on UnrealIRCd)

Code kills user who reached 5 whoises at you per 60 seconds then restarts counter.
Also if user came to net again and start whois again in 100 seconds from first whois, got G:Lined for 15 minutes ^^

Enjoy, and stop assholes :D

on *:SNOTICE:*did a /whois on you*: {
  set -u60 %whois. [ $+ [ $remove($3,$chr(40),$chr(41)) ] $+ ] . [ $+ [ $network ] ] $calc(%whois. [ $+ [ $remove($3,$chr(40),$chr(41)) ] $+ ] . [ $+ [ $network ] ] + 1)
  set -u100 %whois-g. [ $+ [ $remove($3,$chr(40),$chr(41)) ] $+ ] . [ $+ [ $network ] ] $calc(%whois-g. [ $+ [ $remove($3,$chr(40),$chr(41)) ] $+ ] . [ $+ [ $network ] ] + 1)
  $remove($3,$chr(40),$chr(41)) (Timed: %whois. [ $+ [ $2 ] $+ ] . [ $+ [ $network ] ] $+ )
  if (%whois. [ $+ [ $remove($3,$chr(40),$chr(41)) ] $+ ] . [ $+ [ $network ] ] >= 5) {
    $iif(o isincs $usermode,kill $2 Abusing whois (Limit 5 /whois per 60 secs))
    unset %whois. [ $+ [ $remove($3,$chr(40),$chr(41)) ] $+ ] . [ $+ [ $network ] ]
  }
  if (%whois-g. [ $+ [ $remove($3,$chr(40),$chr(41)) ] $+ ] . [ $+ [ $network ] ] >= 10) {
    $iif(o isincs $usermode,gline * $+ $remove($3,$chr(40),$chr(41)) 15m Abusing whois (Limit 10 /whois per 60 secs))
    unset %whois-g. [ $+ [ $remove($3,$chr(40),$chr(41)) ] $+ ] . [ $+ [ $network ] ]
  }
}

Comments

Sign in to comment.
raccoon   -  Mar 11, 2010

So, if you should be interested in client/bot and join all 6 of their channels at the same time, and their poorly written on-join-whois script tags you 6 times, your client goes ahead and kills them?

I sure am glad you don't manage any large or public networks.

on *:SNOTICE:*did a /whois on you*: {
  ; Check if you are an IRCop.
  if (o !isincs $usermode) return
  ; The user's nickname and address.
  var %nick = $2
  var %address = $remove($3,$chr(40),$chr(41))
  ; Incriment variable +15, ticks down -1 every second.
  inc -z %WHOISKILL. [ $+ [ %address $+ . $+ $network ] ] 15
  ; If the variable exceeds 60, there were 5 sent in 1 minute.
  if (%WHOISKILL. [ $+ [ %address $+ . $+ $network ] ] > 60) {
    ; Kill the user.
    kill %nick Abusing WHOIS (Limit 5 /whois per 60 secs)
    ; Unset the counter variable.
    unset WHOISKILL. [ $+ [ %address $+ . $+ $network ] ]
  }
}

I'll let you figure out how to add /gline in there.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.