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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
ComputerTech
Master
Posts: 399 Joined: Sat Feb 22, 2020 10:29 am
Contact:
Post
by ComputerTech » Sun Jun 28, 2020 11:49 pm
So looking for a very simple flood kick script to add to my script
searched through the archive, none that i want
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
cheers to all in advanced
ComputerTech
Carlin0
Voice
Posts: 33 Joined: Tue Dec 04, 2018 3:41 pm
Location: Italy
Post
by Carlin0 » Mon Jun 29, 2020 4:37 am
ComputerTech
Master
Posts: 399 Joined: Sat Feb 22, 2020 10:29 am
Contact:
Post
by ComputerTech » Mon Jun 29, 2020 8:25 am
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
ComputerTech
willyw
Revered One
Posts: 1202 Joined: Thu Jan 15, 2009 12:55 am
Post
by willyw » Mon Jun 29, 2020 8:31 am
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 !
ComputerTech
Master
Posts: 399 Joined: Sat Feb 22, 2020 10:29 am
Contact:
Post
by ComputerTech » Mon Jun 29, 2020 9:03 am
Cheers willyw, will check that out right away
ComputerTech
simo
Revered One
Posts: 1100 Joined: Sun Mar 22, 2015 2:41 pm
Post
by simo » Mon Jun 29, 2020 9:04 am
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:
ComputerTech
Master
Posts: 399 Joined: Sat Feb 22, 2020 10:29 am
Contact:
Post
by ComputerTech » Tue Mar 16, 2021 12:04 am
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
caesar
Mint Rubber
Posts: 3777 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Tue Mar 16, 2021 2:45 am
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.
CrazyCat
Revered One
Posts: 1280 Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:
Post
by CrazyCat » Tue Mar 16, 2021 3:39 am
Why dont use the flood-chan setting ?
ComputerTech
Master
Posts: 399 Joined: Sat Feb 22, 2020 10:29 am
Contact:
Post
by ComputerTech » Tue Mar 16, 2021 11:53 am
I am trying to try make my own Flood Protection Script, like some others have
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
ComputerTech