ok got another twist to this scripting that i been trying to do, i want the bot to be able to set unoped and send x on undernet a msg to ban the person who is spaming wihtout the bot being oped?
Being a Coach Potato is All its cracked up to Be!!
<Cowgyrl> [17:40] Tcl error in file 'bot4.con':
<Cowgyrl> [17:40] wrong # args: should be "proc name args body"
<Cowgyrl> while executing
<Cowgyrl> "proc my:spam {nick uhost hand chan text} {
<Cowgyrl> if {[string match "*@*.users.undernet.org" $uhost]} {
<Cowgyrl> putserv "PRIVMSG X :ban $chan $mask 336 100 spami..."
<Cowgyrl> (file "scripts/spam.tcl" line 3)
<Cowgyrl> invoked from within
<Cowgyrl> "source scripts/spam.tcl"
<Cowgyrl> (file "bot4.con" line 1100)
This is what the tcl looks like ? Can see what i did wrong?
bind pubm - {* *#*} my:spam
proc my:spam {nick uhost hand chan text} {
if {[string match "*@*.users.undernet.org" $uhost]} {
putserv "PRIVMSG X :ban $chan $mask 336 100 spaming"
} || [isop $nick $chan]} { return }
foreach bla [split $text] {
if {[string match "#" $bla]} { continue }
if {[string match "#*" $bla]} {
if {[validchan $bla]} {
continue
}
set mask "*!*@[lindex [split $uhost @] 1]"
newban $mask Spam "\00220 minutes\002 ban for \002Spaming\002 within \002$chan\002 " 20
break
}
}
}
Being a Coach Potato is All its cracked up to Be!!