• Home
  • Servers
  • Chat
  • Channels
  • Commands
  • Forum
  • FAQ
  • Software
  • Quotes
Topic Options
Rate This Topic
#5629 - 08/13/09 09:10 PM Ban user after X joins in Y seconds
Phil Offline
Over 200 posts

Registered: 10/23/06
Posts: 205
Loc: Warwick, UK
The following script bans a user from a specified channel after X joins in Y seconds. This is set to 3 joins in 10 seconds. Read the comments and modify the script to change this.

Code:
; Join flood protect script by Phil
; Bans user after X joins in Y seconds

on *:JOIN:#channel: { ; Set channel name here
  ; First join we're recording
  if ($hget(joinfloodhash, $nick) == $null) {
    hadd -m joinfloodhash $nick 1
  }
  ; Already recorded
  else {
    hinc joinfloodhash $nick
  }

  ; Run timer to decrease value
  .timer 1 10 joinflooddec $nick ; Set Y here (currently 10)

  ; User has joined 3 times
  if ($hget(joinfloodhash, $nick) >= 3) { ; Set X here (currently 3)
    mode $chan +b $address($nick, 2)
  }
}

alias joinflooddec {
  hdec joinfloodhash $1

  ; If count is 0, delete the record
  if ($hget(joinfloodhash, $nick) <= 0) {
    hdel joinfloodhash $nick
  }
}

Top
Sponsored Links
Sponsored Links
Member
*****

Registered: 27/08/04
Posts: 10136
Loc: Mountain View, CA
Top
#5650 - 08/16/09 07:49 PM Re: Ban user after X joins in Y seconds [Re: Phil]
Bkil Offline
Over 50 posts

Registered: 02/15/09
Posts: 50
Loc: Pennsylvania
[17:18:08] ->> You joined channel #gzpower

[17:19:46] ->> You joined channel #gzpower

[17:20:46] ->> You joined channel #gzpower

[17:20:46] * Pand0ra sets mode +b *!*@privatehost-53BBFCD6.phlapa.east.verizon.net for #gzpower

this was on bradjoe96's bot, but using this script, you'll have to get the config he used

Top


Moderator:  Jeff, mandy, usrbingeek