can some one plz help me put a channel specific [.chanset #name <+/- >repeat ] on/ off switch for the following repeat script
i put the setudef flag repeat line
but i do not know where to put the
if {![channel get $chan repeat]} { return 0 } line
thanx in advance
Code: Select all
setudef flag repeat
set repeat-kick 3
set redura 40
set rekick "4Repeating Is Forbidden!!"
bind pubm - * repeat_pubm
proc repeat_pubm {nick uhost hand chan text} {
if [matchattr $hand f] {return 0}
global repeat_last repeat_num repeat-kick banm5 channel botnick
global remask rekick redura
set remask *!*@[lindex [split [getchanhost $nick $chan] "@"] 1]
if [info exists repeat_last([set n [string tolower $nick]])] {
if {[string compare [string tolower $repeat_last($n)] \
[string tolower $text]] == 0} {
if {[incr repeat_num($n)] >= ${repeat-kick}} {
if {[isop $nick $chan] == "0"} {
putserv "MODE $chan +mib $remask"
putserv "KICK $chan $nick :$rekick"
utimer $redura "putserv {MODE $chan -mi}"
unset repeat_last($n)
unset repeat_num($n)
}
}
return
}
}
set repeat_num($n) 1
set repeat_last($n) $text
}
bind nick - * repeat_nick
proc repeat_nick {nick uhost hand chan newnick} {
if [matchattr $hand f] {return 0}
global repeat_last repeat_num
catch {set repeat_last([set nn [string tolower $newnick]]) \
$repeat_last([set on [string tolower $nick]])}
catch {unset repeat_last($on)}
catch {set repeat_num($nn) $repeat_num($on)}
catch {unset repeat_num($on)}
}
proc repeat_timr {} {
global repeat_last
catch {unset repeat_last}
catch {unset repeat_num}
timer 1 repeat_timr
}
if ![regexp repeat_timr [timers]] { # tko
timer 1 repeat_timr
}