When somebody in a chan does a text flood of 3 lines first kick him. If he text floods 3 lines again then ban him. If the text flood is big ie. lots of lines, then set the channel to +im.
When there is a join-part flood at the first 2 join parts kick the person. The next 2 join parts he makes ban him.
When a lot of people join the chan very fast (over 7 people) then set the chan to +i. If they also do a text flood then ban all the joiners.
When a person uses colours kick him and if he does it again ban him. If he uses a lot of colours kick/ban him immediately.
When a person changes his nick 4 times (time irrelevant) ban him.
The same goes for ctcp and notice floods. first kick and then ban.
Can you tell me how to implement the "First kick him and then ban him if he does it again" part?
I dont know how to save the information to use for later use.
Please demonstrate with a rough code if you can.
Appreciate your help.
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
For this you can take a look at slennox's repeat kick tcl.
That script detects if a *!*@host repeats then punishes the
user accordingly, then it records the host in a variable list and then
if another repeat flood is detected within the given amount of
time by that *!*@host matches the previously banned host
then the user can be punished accordingly.
That is a good script to serve this purpose.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================
#----Text Flood Starts------
#NOTE: TO SET THIS ON JUST SET THE CHANNEL TO +textflood
#Kick On How Many Lines?
set txt_kick 3
#Kick Reason?
set txt_kick_reason "text flood detected, stin epomeni exei ban."
#Kick-Ban On How Many Lines?
set txt_ban 6
#Ban Reason?
set txt_ban_reason "sto ipa ego gidi-text flood ban 10min"
#Ban Time? (MINUTES)
set txt_ban_time 10
#Set Here The Expiry Time For The Lines. (SECONDS)
set txt_time 60
#----Text Flood Ends------
#----Strong Text Flood Starts------
#NOTE: TO SET THIS ON JUST SET THE CHANNEL TO +strongtextflood
#Set Here The (Lines:In How Many Seconds) To Trigger The Specific Mode Change.
set txt_flood_time 5:4
#Set Here The Modes To Set In The Channel.
set txt_flood_mode "mi"
#Set Here The Time To Remove The +im (MINUTES)
set txt_flood_mode_time 10
#----Strong Text Flood Ends------
set txt_flood_time [split $txt_flood_time ":"]
#Load Vars
proc loadvars {type} {
global textcount
set textcount 0
}
#Binds
bind evnt - connect-server loadvars
bind pubm - "*" txt_flood
#Flags
setudef flag textflood
setudef flag strongtextflood
#Text Flood Starts
proc txt_flood {nick host handle chan text} {
global txt_count textcount userprotect userchanprotect txt_kick txt_kick_reason txt_ban txt_ban_reason txt_ban_time txt_time txt_flood_time
set host [string tolower $host]
set chan [string tolower $chan]
set text [string tolower $text]
if {![channel get $chan textflood]} {return 0}
if {[isbotnick $nick]} {return 0}
if {[matchattr $handle $userprotect]} {return 0}
if {[matchattr $handle &${userchanprotect} $chan]} {return 0}
if {[channel get $chan strongtextflood]} {
incr textcount
if {![string match "*txtcount*" "[utimers]"]} {
utimer [lindex $txt_flood_time 1] [list txt_check "$chan"] }}
if {![info exists txt_count($host:$chan)]} {
set txt_count($host:$chan) "0"
utimer $txt_time [list unset txt_count($host:$chan)] }
incr txt_count($host:$chan)
if {$txt_count($host:$chan) == "$txt_ban"} {
if {[botisop $chan] && [onchan $nick $chan]} {
set banmask *!*[string tolower [string range $host [string first "@" $host] end]]
putquick "MODE $chan +b $banmask" -next
putquick "KICK $chan $nick :$txt_ban_reason" -next
newchanban $chan $banmask "Txt Flood" $txt_ban_reason $txt_ban_time sticky
unset txt_count($host:$chan) }}
if {[info exists txt_count($host:$chan)]} {
if {$txt_count($host:$chan) == "$txt_kick"} {
if {[botisop $chan] && [onchan $nick $chan]} {
putquick "KICK $chan $nick :$txt_kick_reason" -next }}}
return 1 }
#Text Flood Check To Set +im
proc txt_check {chan} {
global textcount txt_flood_time txt_flood_mode_time txt_flood_mode
if {$textcount == [lindex $txt_flood_time 0]} {
putquick "MODE $chan +$txt_flood_mode" -next
channel set $chan chanmode +$txt_flood_mode
utimer $txt_flood_mode_time [list channel set $chan chanmode -$txt_flood_mode]
utimer $txt_flood_mode_time [list putquick "MODE $chan -$txt_flood_mode" -next] }
set textcount "0" }
#Text Flood Ends
The Problem Is The It doesn't Set The Channel to +im When There Are Over 5lines in 4seconds as specified in the configuration.
Everything else works fine.
Please help me. Thanks
(c) CoMMy (c)
Resistance is Futile!!
We Are The Borg!!
Make a seperate procedure to enforce the mode locks and then to remove them after the time you choose.
Make sure you use getchan mode to check already if the modes
aren't in place as some ops and bots already enforce modes, and
do the same when removing the modes, so it doesnt do a mode flood.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee) PS: Guys, I don't accept script helps or requests personally anymore.
==================================