This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

flood protection

Support & discussion of released scripts, and announcements of new releases.
Post Reply
s
samhain
Halfop
Posts: 77
Joined: Wed Jan 03, 2007 5:19 am

flood protection

Post by samhain »

I saw a post by awyeah, and came to know about this script... find I don't know how is it going to work can any one give me an example... also if you could tell me will it detect net splits or not?

Code: Select all

 set mjointrigger "3:5"

bind join - "*" mass:join:chan

proc mass:join:chan {nick uhost hand chan} {
 global botnick mjointrigger joinflood kickno net_split
 if {[isbotnick $nick] || [info exists net_split]} { return 0 }
 set host "*!*@[lindex [split [maskhost $uhost] @] 1]"
 set user [string tolower $chan]
 if {[string match -nocase "#*" $chan]} {
 if {![info exists joinflood($user)]} {
   set joinflood($user) 0
  }
  utimer [lindex [split $mjointrigger :] 1] [list mass:join:list $user]
  if {[incr joinflood($user)] >= [lindex [split $mjointrigger :] 0]} {
   if {[botisop $chan]} {
    putquick "MODE $chan +b $host" -next
    set clonenicks [list]; set clonenum 0
    foreach person [chanlist $chan] {
     if {[string match -nocase *$host* "$person![getchanhost $person $chan]"] && ![isop $person $chan] && ![isvoice $person $chan]} {
      incr clonenum; lappend clonenicks $person:$clonenum
      }
    }
    foreach clone $clonenicks {
     putquick "KICK $chan [lindex [split $clone :] 0] :0,1 Clone Mass Join Flood 12,0 - You 2joined with6 [lindex [split $mjointrigger :] 0] clients 2or more 12in less than6 [lindex [split $mjointrigger :] 1] secs 12from the host 6*!*@[lindex [split $uhost @] 1] 12- (Clone2 #[lindex [split $clone :] 1] 12of2 #[llength $clonenicks]12)" -next
    }
    unset clonenicks; unset clonenum
    timer 60 [list putquick "MODE $chan -b $host"]
    }
   if {[info exists joinflood($user)]} { unset joinflood($user) }
  }
 }
}

proc mass:join:list {user} {
 global joinflood
 if {[info exists joinflood($user)]} { incr joinflood($user) -1 }
}


bind splt "*" - mass:join:split
bind rejn "*" - mass:join:rejoin

proc mass:join:split {nick host hand chan} {
 global net_split
  if {[info exists net_split]} {
   return 0
  } elseif {![info exists net_split] && [onchansplit $nick $chan]} {
   set net_split 1
   }
}

proc mass:join:rejoin {nick host hand chan} {
 global net_split
  if {[info exists net_split]} {
   utimer 5 [list "unset net_split"]
   }
} 
If yes then please tell me well it detect netsplits on undernet... and will this script work in this situations
02[12:35] 01*02*12* [01#usa] Punishing 01[^FuL|an0^] (~akbbkvaz@c-68-62-75-66.hsd1.mi.comcast.net) Notice flood - 1 in 3 sec - Offense 1 (bk0)
03[12:35] *** Cash-money-r (~lqptcyj@adsl-76-241-188-222.dsl.sfldmi.sbcglobal.net) has joined #usa
05[12:35] -Cash-money-r:#usa- 4,1Jj` [censored] ur MOM SISTERS where is ur bitch sis TinaStar ? i listened yesterday she is a tight bitch & we can take her for a night for 50$4.I`ll pay u 60$ so take her soon without clothes.coz i love to see ur slut TinaStar sis completly nude.(THE GAME IS GEGUN NOW 7Jj`[censored] u Jj` 12(Papa's flooder)
02[12:35] 01*02*12* [01#usa] Punishing 01Cash-money-r (~lqptcyj@adsl-76-241-188-222.dsl.sfldmi.sbcglobal.net) Notice flood - 1 in 3 sec - Offense 1 (bk0)
03[12:35] *** |MetalMan| (~iiiocoog@adsl-76-241-188-222.dsl.sfldmi.sbcglobal.net) has joined #usa - Clones: 2 from |MetalMan| (Cash-money-r) CtrlF1 whois; ShiftF8 ping; F8 to punish
05[12:35] -|MetalMan|:#usa- 4,1Jj` [censored] ur MOM SISTERS where is ur bitch sis TinaStar ? i listened yesterday she is a tight bitch & we can take her for a night for 50$4.I`ll pay u 60$ so take her soon without clothes.coz i love to see ur slut TinaStar sis completly nude.(THE GAME IS GEGUN NOW 7Jj`[censored] u Jj` 12(Papa's flooder)
02[12:35] 01*02*12* [01#usa] Punishing 01|MetalMan| (~iiiocoog@adsl-76-241-188-222.dsl.sfldmi.sbcglobal.net) Notice flood - 1 in 3 sec - Offense 1 (bk0)
03[12:35] *** vendeur71 (~jhklork@68.62.75.66) has joined #usa
05[12:35] -vendeur71:#usa- 4,1Jj` [censored] ur MOM SISTERS where is ur bitch sis TinaStar ? i listened yesterday she is a tight bitch & we can take her for a night for 50$4.I`ll pay u 60$ so take her soon without clothes.coz i love to see ur slut TinaStar sis completly nude.(THE GAME IS GEGUN NOW 7Jj`[censored] u Jj` 12(Papa's flooder)
02[12:35] 01*02*12* [01#usa] Punishing 01vendeur71 (~jhklork@68.62.75.66) Notice flood - 1 in 3 sec - Offense 1 (bk0)
03[12:35] *** X sets mode: +l 122
03[12:35] *** [[KurtCobain (~zmmzowxn@cpe-75-83-182-231.socal.res.rr.com) has joined #usa
05[12:35] -[[KurtCobain:#usa- 4,1Jj` [censored] ur MOM SISTERS where is ur bitch sis TinaStar ? i listened yesterday she is a tight bitch & we can take her for a night for 50$4.I`ll pay u 60$ so take her soon without clothes.coz i love to see ur slut TinaStar sis completly nude.(THE GAME IS GEGUN NOW 7Jj`[censored] u Jj` 12(Papa's flooder)
02[12:35] 01*02*12* [01#usa] Punishing 01[[KurtCobain (~zmmzowxn@cpe-75-83-182-231.socal.res.rr.com) Notice flood - 1 in 3 sec - Offense 1 (bk0)
03[12:35] *** Dr^IshQbla (~ipgjlipk@cpe-75-83-182-231.socal.res.rr.com) has joined #usa - Clones: 2 from Dr^IshQbla ([[KurtCobain) CtrlF1 whois; ShiftF8 ping; F8 to punish
05[12:35] -Dr^IshQbla:#usa- 4,1Jj` [censored] ur MOM SISTERS where is ur bitch sis TinaStar ? i listened yesterday she is a tight bitch & we can take her for a night for 50$4.I`ll pay u 60$ so take her soon without clothes.coz i love to see ur slut TinaStar sis completly nude.(THE GAME IS GEGUN NOW 7Jj`[censored] u Jj` 12(Papa's flooder)
02[12:35] 01*02*12* [01#usa] Punishing 01Dr^IshQbla (~ipgjlipk@cpe-75-83-182-231.socal.res.rr.com) Notice flood - 1 in 3 sec - Offense 1 (bk0)
03[12:35] *** ZaMaN_EL_3aG (~kuzwcvmm@cpe-75-83-182-231.socal.res.rr.com) has joined #usa - Clones: 3 from ZaMaN_EL_3aG (Dr^IshQbla, [[KurtCobain) CtrlF1 whois; ShiftF8 ping; F8 to punish
User avatar
Trixar_za
Op
Posts: 143
Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:

Post by Trixar_za »

AllProtection by Sir_Fz script has a few interesting functions that can help prevent stuff like this. It's an awesome script if you take the time to configure it. Word of warning though, it has the ability to scan for bots like you listed, but it takes a little more time to work, which slows down any other function your bot might have - like Trivia or Uno or just quick responses. Most people disable it because of this - I myself will be dedicating an eggdrop to using AllProtection fully :P
s
samhain
Halfop
Posts: 77
Joined: Wed Jan 03, 2007 5:19 am

Post by samhain »

I enabled ap:drones + function of allprotection, I use it in my bot, But it doesn't detect netsplit returns... from massjoins, also it does not eliminate the join flood clones, where as it only sets the lock modes, This script by awyeah is justperfect, but I want to know will it detect netsplits on undernet?
s
stormshadow
Voice
Posts: 7
Joined: Fri Mar 11, 2011 12:15 am

Post by stormshadow »

From what you are asking I am going to say that you believe that the bot will detect a netsplit rejoin as a join flood.
This isn't true, the bind of "join" is NOT triggered by a netsplit rejoin. The bind of "REJN" is though (this is actually for that purpose).
(Here is a list binds and their descriptions)

This first script (the code you pasted) does in fact detect netsplits.
evident by the line:

Code: Select all

bind rejn "*" - mass:join:rejoin
I don't know, however, if the bot has some timeout for rejoins after netsplits.
You may have a problem if the netsplit goes on for too long in that case.

This is the only evidence I have to suggest that it does timeout, but I don't know if it affects binds

Code: Select all

(Origin from the Conf file)
# Set here the time (in seconds) to wait for someone to return from a netsplit
# (i.e. wasop will expire afterwards). Set this to 1500 on IRCnet since its
# nick delay stops after 30 minutes.
set wait-split 600
If anyone knows if this does timeout for binds, please let us know.
Thanks. :D
Post Reply