Code: Select all
#---------------------------------------------------------------------------------------------
# ACTION repeating (channel actions)
#---------------------------------------------------------------------------------------------
proc repeat_action {nick uhost hand dest keyword text} {
global botnick altnick repeat_last repeat_num repeatkick repeatmsg repeatban repeatbantime repeatonoff inuse timercalled
if {$repeatonoff([string tolower $dest]) == 0 } { return }
set type ""
set text [trimctrl $text]
if {$dest == $botnick || $dest == $altnick || [matchattr $hand f|f $dest]} {return 0}
if [info exists repeat_last([set n [string tolower $nick]])] {
# Tell other bots I'm handling (or check to see if its being handled.
set canprocess [check_handling 0]
if {$canprocess == 1} { return 1 }
set inuse 1
if {[string compare [string tolower $repeat_last($n)] [string tolower $text]] == 0} {
set type "EXACT MATCH"
repeat_dostuff $nick $uhost $hand $dest $text $n $type
set repeat_last($n) $text
clear_handling
return
} \
elseif {[mask_check $n $text [string tolower $repeat_last($n)]] == 1} {
set type "Mask check FAIL"
repeat_dostuff $nick $uhost $hand $dest $text $n $type
set repeat_last($n) $text
clear_handling
return
} \
elseif {[letter_check $n $text $dest [string tolower $repeat_last($n)] 1 ""] == 1} {
set type "Letter check FAIL"
repeat_dostuff $nick $uhost $hand $dest $text $n $type
set repeat_last($n) $text
clear_handling
return
}
if {$timercalled == 1} {
catch {unset repeat_last}
catch {unset repeat_num}
set timercalled 0
}
set inuse 0
# Clear "Im handling" botflags
clear_handling
}
set repeat_num($n) 1
set repeat_last($n) $text
}
now here is the question: i was wondering what i should change for the script to stop kicking/checking for amsgs/ame, and only check for repeats per channel. Cus i dont wanna kick/ban on an /amsg or when some1 goes away and it does an /ame with his away reason.