Kod: Kodu kopyalamak için üzerine çift tıklayın!
bind pubm - "#adwords *" ad:words
proc ad:words {nick uhost hand chan text} {
set dosya "spam.txt"
set text [filter [stripcodes bcruag $text]]
if {[regexp -nocase -- {\((.*?):PRIVMSG:(.*)$} $text "" hedef laf]} {
regsub -all -- {[A-Z\+\%\`\=\&\#\+\-\_\!\~\<\,\@\#\$\%\^\&\*]} "A+%`=&#+-_!~<,@#$%^&*" "" laf
set laf *[string map -nocase {" " *} $laf]*
set i 0
set fp [open $dosya r]
while {[gets $fp b] > -1} {
if {[string match -nocase "*$b*" $laf]} {
putquick "shun $hedef 5m :det!!!"
putquick "sajoin $hedef 0"
putquick "sajoin $hedef #uyarı"
incr i
}
}
close $fp
}
return 0
}
proc filter {text} {
set text [string map {\\ \\\\ \[ \\\[ \] \\\] \{ \\\{ \} \\\} \$ \\\$ \" \\\"} $text]
return $text
}
Tcl ile de böyle birşey olsa gerek....