Hi, Ive search all over for a script to do what I want without much luck.
I am trying to set up an #idle type channel and need a script (or settings) that would auto kick/ban people for 30 minutes for talking in the channel.
Code: Select all
bind pubm -|- * blocked:words
setudef flag bwords
#Rlsdate : 28-05-2003
#? and * works as wildcards
set bwords(words) "*"
#Allow pflag to use these words ?
set bwords(p) 1
set bwords(pflag) o
#How long time to last ? must be in minutes.
set bwords(mins) 30
bind ctcp -|- * blocked:words2
proc blocked:words2 {nick uhost handle dest keyword text} {
if {[validchan $dest]} { blocked:words $nick $uhost $handle $dest $text }
}
proc blocked:words {nick uhost handle chan text} {
global botnick bwords
set word [join [lindex [split $text] 0]]
if {![string match "*+bwords*" [channel info $chan]]} { return 0 }
if {[matchattr $handle $bwords(pflag)|$bwords(pflag) $chan] && $bwords(p)==1} { return 0 }
foreach w [split $bwords(words) " "] {
if {[string match [join $w] [join $word]]} {
set nck [split [getchanhost $nick] "@"]
set b1 [split [lindex $nck 1] "\."]
set domain [lindex $b1 [expr [llength $b1]-2]].[lindex $b1 [expr [llength $b1]-1]]
set banmask *![lindex $nck 0]@*.$domain
newchanban $chan $banmask $botnick "$bwords (mins) mins anti-idle ban. ([strftime %m-%d-%Y@%H:%M])" $bwords(mins)
putlog "Banned $nick@$chan for using $word."
return 0
}
}
}
putlog "Bwords loaded v2.1 : Bad words list = $bwords(words)"