Mass join protection

By N3M3S1S on Aug 06, 2010

Yes its the new version!
MASS JOIN KICKER II

Stomps out large amounts of clones/spam bots from entering your channel. Triggered at 7 joins in 5 seconds, it automatically locks down the channel and kicks out all the clones/spam bots that come in.

Just copy and paste to your remotes After loading if it asks to run initialization commands, click "Yes". Then right click and go down to MASS JOIN KICKER II and it can be toggled on and off.

;MASS JOIN KICKER II
;By Neo Nemesis
;Contributors: Jethro_
;Thanks to: Hawkee Forums

on *:START: { massjoin }
on *:LOAD: { massjoin }
on *:CONNECT: { massjoin }

alias -l massjoin { if ($hget(massjoin) == $null) { hmake massjoin 750 } }
alias -l abmj { 
  echo -a 12,1*!14 MASS JOIN KICKER II 12!*
  echo -a 12,1*!14 By Neo Nemesis 12!*
  echo -a 12,1*!14 http://mirc-deluxe.webs.com 12!* 
}

on @*:JOIN:#: {
  if (%massjoin == $true) {
    set -u15 %mj1 $addtok(%mj1,$nick,44)
    hinc -mu5 massjoin JOIN 1
    if ($hget(massjoin,JOIN) >= 7) {
      if (%modechan != $true) {
        mode $chan +im
        set -u15 %modechan $true
        set -u15 %mj2 1
        notice $chan 12*! 4MASS JOIN DETECTED12 !* 2- 12channel locked down for4 5-7 minuets.12 Sorry for any inconvenience this may cause.
        .timermjs 1 300 mode $chan -im
      }
      while (%mj2 <= $numtok(%mj1,44)) {
        if ($gettok(%mj1,%mj2,44) ison $chan) && ($gettok(%mj1,%mj2,44) !isreg $chan) {
          if (%mj2 <= 8) { .timermj $+ %mj2 -m 1 $calc(780 * %mj2 kick $chan $gettok(%mj1,%mj2,44) 2MASS JOIN KICKER II - By Neo Nemesis }
          elseif (%mj2 > 8) { .timermj $+ %mj2 -m 1 $calc(897 * %mj2) kick $chan $gettok(%mj1,%mj2,44) 2MASS JOIN KICKER II - By Neo Nemesis }
        }
        inc %mj2
      }
    }
  }
}
menu status,query,nicklist,channel {
  MASS JOIN KICKER II - $iif(%massjoin = $true,ON,OFF)
  .ON:/set %massjoin $true
  .OFF:/set %massjoin $false
  .About:/abmj
}

Comments

Sign in to comment.
simo   -  Sep 25, 2017

...

 Respond  
JoKabua   -  Mar 23, 2011

That doest work too... I try on mIRC 6.35 it doesn't work

 Respond  
N3M3S1S   -  Mar 22, 2011

I use 6.35. That is what this script worked on. If you're looking for something better try:

http://www.hawkee.com/snippet/8346/

^ this

 Respond  
JoKabua   -  Mar 22, 2011

What mIRC version this will work?

 Respond  
amd86   -  Nov 16, 2010

are u already test this code ?

 Respond  
N3M3S1S   -  Nov 15, 2010

Here you go. Try this. Added a "if isreg" statement to the script to hopefully help avoid kicking on a net split.

;MASS JOIN KICKER II
;By Neo Nemesis
;Contributors: Jethro_
;Thanks to: Hawkee Forums

on *:START: { massjoin }
on *:LOAD: { massjoin }
on *:CONNECT: { massjoin }

alias -l massjoin { if ($hget(massjoin) == $null) { hmake massjoin 750 } }
alias -l abmj { 
  echo -a 12,1*!14 MASS JOIN KICKER II 12!*
  echo -a 12,1*!14 By Neo Nemesis 12!*
  echo -a 12,1*!14 http://mirc-deluxe.webs.com 12!* 
}

on @*:JOIN:#: {
  if (%massjoin == $true) {
    set -u15 %mj1 $addtok(%mj1,$nick,44)
    hinc -mu5 massjoin JOIN 1
    if ($hget(massjoin,JOIN) >= 7) {
      if (%modechan != $true) {
        mode $chan +im
        set -u15 %modechan $true
        set -u15 %mj2 1
        notice $chan 12*! 4MASS JOIN DETECTED12 !* 2- 12channel locked down for4 5-7 minuets.12 Sorry for any inconvenience this may cause.
        .timermjs 1 300 mode $chan -im
      }
      while (%mj2 <= $numtok(%mj1,44)) {
        if ($gettok(%mj1,%mj2,44) ison $chan) && ($gettok(%mj1,%mj2,44) !isreg $chan) {
          if (%mj2 <= 8) { .timermj $+ %mj2 -m 1 $calc(780 * %mj2 kick $chan $gettok(%mj1,%mj2,44) 2MASS JOIN KICKER II - By Neo Nemesis }
          elseif (%mj2 > 8) { .timermj $+ %mj2 -m 1 $calc(897 * %mj2) kick $chan $gettok(%mj1,%mj2,44) 2MASS JOIN KICKER II - By Neo Nemesis }
        }
        inc %mj2
      }
    }
  }
}
menu status,query,nicklist,channel {
  MASS JOIN KICKER II - $iif(%massjoin = $true,ON,OFF)
  .ON:/set %massjoin $true
  .OFF:/set %massjoin $false
  .About:/abmj
}
 Respond  
amd86   -  Nov 06, 2010

the problem is iam noob...donoo how to edit code and make netsplit quit event :(

Peace

 Respond  
N3M3S1S   -  Nov 06, 2010

Oh wow lots of feed back >_> Who ever feels up to it, you are all more than welcome to edit/alter this snippet.

 Respond  
Jethro   -  Nov 05, 2010

I think you can detect netsplit through the quit event. Once a netsplit occurs, you can disable the join event temporarily using /enable and /disable with a timer. This way they don't trigger the join flood script upon "comeback." Every netsplit quit message varies from server to server, though.

 Respond  
amd86   -  Nov 05, 2010

the exces flood u see while iam test using proxy..i load sock just 30 like that...when iam using bnc...i can kick around 50 without have any problem,this not my fist time try mass join protection. that why i chose this code...this code kick slowly make my conection no lag at all..now the problem is not excess flood..the problem now is i dont want kick netsplit user rejoin my chan . 1 more thing,why i need other ops to remove mode i set? peace :P

 Respond  
WorldDMT   -  Nov 05, 2010

so u think when u got excess flood your chan is protected? :)

 Respond  
amd86   -  Nov 05, 2010

nahh .. my chan ops always afk...for me auto-limit cant protect my chan if someone wanna flood... (already try many auto-limit addon) :) that why i think people create mass join protection i guest :P , let say u +l 10 on u chan,and then u disconnect,and the room is full..can u re-join u chan? and automatic remove +l while u sleep?

 Respond  
WorldDMT   -  Nov 05, 2010

but there are operators in your chan i think
when u got deconnect they can remove it :)
in both cases your code will not work in auto-limit or in other
when u got disconnect

 Respond  
amd86   -  Nov 05, 2010

my reason not use auto-limit,when me disconect user cant join my chan :) if my chan full,that why i set my mlock -i ... and pc need rest to :P

 Respond  
WorldDMT   -  Nov 05, 2010

why not using auto limit??
something like this E.G

on *:join:#:timerlimit 1 5 mode # +l $calc($nick(#,0) +2)
on *:part:#:{
  inc -u2 %fld
  if %fld >= 7 {
    mode # +i
    timeri 1 4 mode # -i
  }
  timerlimit 1 5 mode # +l $calc($nick(#,0) +2)
}

in this case if two users join the channel the third can not join that after 5 sec and if more than 7 leave this will execute mode +i bcz of limit isnt +2 yet

this is just an EG so i dont have mIRC here (not tested)
but u can have an idea

 Respond  
Jethro   -  Nov 05, 2010

jaytea wrote:

Jethro, using %period like that effectively removes any significance it has since you increase item %f by %period but then later multiply by %period in the comparison.Thanks, jaytea for the lesson. I tend to complicate myself sometimes and make mistakes. :P

As for the "illogic" of N3M3S1S original code, he's got some explaining to do. lol

 Respond  
amd86   -  Nov 05, 2010

test result same ... no user kick on mass join

 Respond  
jaytea   -  Nov 05, 2010

Jethro, using %period like that effectively removes any significance it has since you increase item %f by %period but then later multiply by %period in the comparison.

the logic in the original code is also incorrect.

inc -u5 %a | if (%a = 7) {

the above format checks precisely '7 times each separated by at most 5 seconds'. with maximal delays, this will trigger for 7 times in 30 seconds (each line received exactly 5s after the last). the correct logic to match '7 times in 5 seconds' can be achieved with something such as the following:

inc -zu5 %a 5 | if (%a > 30) {

the key difference here is that the information regarding the delays between each message is preserved implicitly by using -z. i used /inc in this example since /hinc is presently (7.14) bugged such that -u and -z cannot be used together (the -u is ignored). [EDIT: this was fixed in 7.16] one way around this is by using timers:

hinc -mz a b 5 | .timer 1 5 hdel a b | if ($hget(a, b) > 30) {

there is yet another equivalent form that might help you wrap your heads around the method:

hadd -mu5 a b $+ $ticks | if ($hfind(a, b*, 0, w) = 7) {
 Respond  
Jethro   -  Nov 05, 2010

amd86, give this one a shot:

on @*:join:#:c joinflood
alias xyjoinflood return 7 5
alias -l c {
  tokenize 32 $($+($,xy,$1),2) 
  var %times $1, %period $2, %4 $chr(44), %f $+($network,%4,#,%4,$site,%4,$1) 
  hinc -mu2 Prot %f %period
  if ($hget(Prot,%f) < $calc(%period * (%times - 1))) { return } 
  hdel Prot %f | var %f = $+(W,%4,%f) 
  hinc -u5 prot %f 
  if ($hget(Prot,%f) < 2) { 
    ban -k # $nick 2 No flooding! $nick has flooded more than %times times within %period seconds.
  }
}
 Respond  
amd86   -  Nov 05, 2010

i change the code like u say...but this time..the problem is...the script wont kick mass join user -.-

 Respond  
amd86   -  Nov 05, 2010

i try check the code...hope the code working...need wait for netsplit :)

 Respond  
Jethro   -  Nov 04, 2010

Mmm...why do you make a double check for? isreg $chan is indicative of whether the regular nickname is on channel or not.

 Respond  
N3M3S1S   -  Nov 04, 2010

When I have time yes. I'm very busy at the moment working on the public release of mIRC DeluXe and putting bread on my table.

All that needs to be done is change:

if ($gettok(%mj1,%mj2,44) ison $chan) {

to

if ($gettok(%mj1,%mj2,44) ison $chan) && ($gettok(%mj1,%mj2,44) !isreg $chan) {

I just dont have time to test it or tinker with it at the moment. I will as soon as I can.

 Respond  
amd86   -  Nov 04, 2010

can u edit the script,for dont kick netsplit user rejoin the channel?

 Respond  
N3M3S1S   -  Oct 20, 2010

Netsplits weren't considered in this script, could be easily fixed with a if ($nick !isreg $chan) i think.

Why did you excess flood? Did you change the trigger?

 Respond  
amd86   -  Oct 19, 2010

hello...N3M3S1S
i try u snippet just now,and test load 60bot..and the resoult is

  • Papa-42 was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • n8444 was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • r4944 was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • Cr_IsTri_KoNTraK was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • co_Alpins was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • abbie_jkt was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • Pemuas_tante was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • Guest47400 was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • co_sagita was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • f6991 was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • e8871 was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • co_siap_antar was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • VictorieS was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • huyhuyhuy was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • danial_want was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • cari_c3wek was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • KiDD_Rock was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • Co_Calm_cari_Pacar was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • nyari-teman was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • imoet was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • c0_chin_FunniesT was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • suressh was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • e9515 was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • co-dewasa was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • dicky_m was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • aruaNgackt was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • mw_diORAL_cow was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • adadad was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • c0_kuliah_bdg was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • nady-g was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • bads was kicked by test1 (MASS JOIN KICKER II - By Neo Nemesis)
  • test1 (oklor@203.82.95.cQ39=) Quit (Excess flood)

my question is
(if netsplit happen,whether this script kick user join?)

 Respond  
N3M3S1S   -  Sep 02, 2010

Congratulations. Never heard of Pbot.

And please don't spam your scripts in my script's thread, thanks :D

 Respond  
Solo   -  Sep 02, 2010

There is not much in these scripts anymore, as Pbot was created and protects an entire server from everything, not just mass joins. It saved my server from spam bots, I found these sort of snippets did nothing for me.

http://www.hawkee.com/scripts/14124640/

 Respond  
N3M3S1S   -  Sep 02, 2010

Updated the code, found a fatal bug that makes people flood out (the .notice was in the wrong spot so after 7 joins it noticed the channel every join instead of just once) its fixed now and works nicely!

 Respond  
N3M3S1S   -  Aug 10, 2010

LOL Indeed. It works, very nicely in fact, so try it out! Please :D

 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.