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.

Very Simplistic Flood Kick Script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Very Simplistic Flood Kick Script

Post by ComputerTech »

So looking for a very simple flood kick script to add to my script

searched through the archive, none that i want :roll:

so if someone could make one for me, well that would be brilliant

and of course i'll add their nick to the script credits 8)

cheers to all in advanced
ComputerTech
User avatar
Carlin0
Voice
Posts: 28
Joined: Tue Dec 04, 2018 3:41 pm
Location: Italy

Post by Carlin0 »

In partyline type

Code: Select all

.help chaninfo
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

Umm hehe thanks but i kind of already know that, was asking for a small Piece of code rather, i'll try the archive again :roll:
ComputerTech
w
willyw
Revered One
Posts: 1196
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

If you are writing it yourself, you might like to have a look at:
https://docs.eggheads.org/mainDocs/tcl-commands.html
and find:
bind flud

Read the description carefully.


Perhaps you can use that and come up with something that is exactly what you want. :)
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

Cheers willyw, will check that out right away :wink:
ComputerTech
s
simo
Revered One
Posts: 1071
Joined: Sun Mar 22, 2015 2:41 pm

Post by simo »

Code: Select all

bind flud - pub flud:ban

proc flud:ban { n u h t c } {
  pushmode $c +b *!$u
  putkick $c $n "text_flood"
}
took this from:
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

Thanks Simo :D
ComputerTech
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

Just thought i'd share some Code a friend of mine(Nando) made

Code: Select all

# configure the text flood tolerance lines per seconds
set text_tolerance "4:10"

# end of config
bind pubm - * chan_flood

proc chan_flood {nick uhost hand chan text} {
  global text_tolerance nick_last_message_time nick_lines nick_time

  set time_now [unixtime]
  set lines [lindex [split $text_tolerance :] 0]
  set seconds [lindex [split $text_tolerance :] 1]

  if {[info exists nick_last_message_time($nick:$chan)]} {
    if {[expr ($time_now - $nick_last_message_time($nick:$chan))] > $seconds} {
      set nick_lines($nick:$chan) 0
    }
  }

  incr nick_lines($nick:$chan)

  if {$nick_lines($nick:$chan) == 1} {
    set nick_time($nick:$chan) [unixtime]
  }

  if {($nick_lines($nick:$chan) > $lines) && ([expr ($time_now - $nick_time($nick:$chan))] <= $seconds)} {
    putserv "PRIVMSG $chan :kick $nick flood"
    unset nick_lines($nick:$chan)
  }
  set nick_last_message_time($nick:$chan) [unixtime]
}
:)
ComputerTech
User avatar
caesar
Mint Rubber
Posts: 3776
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Why bother re-inventing the wheel when you got bind flud to trigger for whatever you wanted?

Instead of:

Code: Select all

set lines [lindex [split $text_tolerance :] 0]
set seconds [lindex [split $text_tolerance :] 1]
I would go with:

Code: Select all

scan [split $text_tolerance :] {%d%d} lines seconds
There are a couple of other things I would change, like instead of relying on two separate arrays would use just one and have all the info in there. Do you track and update nick changes, parts, quits and so on?
Once the game is over, the king and the pawn go back in the same box.
User avatar
CrazyCat
Revered One
Posts: 1216
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Why dont use the flood-chan setting ?

Code: Select all

.chanset #foo flood-chan 4:10
User avatar
ComputerTech
Master
Posts: 399
Joined: Sat Feb 22, 2020 10:29 am
Contact:

Post by ComputerTech »

I am trying to try make my own Flood Protection Script, like some others have :wink:

and thanks @caesar for your suggestion, will change that ;)

and i haven't planned how to track things as you said yet, of course if you have any more ideas, do share :P
ComputerTech
Post Reply