Code: Select all
bind msgm - * handlemsg
set isO 0
set currLine 0
set home "#mychan"
proc handlemsg {nick uhost hand chan args} {
global isO currLine home
if {$nick != "O"} {
return
} else {
set response [split $args " "]
if {[lindex $response 0] != "Pos"} {
return
} else {
msg $home "debug"
incr currLine
if {$currLine < 6} {
foreach i [split $misc2 ""] {
notice "tuxX" "test"
}
} else {
return
}
}
}
}
Code: Select all
msg $home "debug"
Code: Select all
putserv "PRIVMSG $home :debug"
Code: Select all
proc msg {a b} {putserv "privmsg $a :$b"}
and the code:|12:28| »» [Rbot] [12:28] Tcl error [handlemsg]: wrong # args: should be "handlemsg nick uhost hand chan arg"
Code: Select all
bind msgm - * handlemsg
proc handlemsg {nick uhost hand chan arg} {
global isO currLine home
if {$nick != "O"} {
return
} else {
set response [split $arg " "]
if {[lindex $response 0] != "Pos"} {
return
} else {
msg $home "debug"
incr currLine
if {$currLine < 6} {
foreach i [split $misc2 ""] {
notice "tuxX" "test"
}
} else {
return
}
}
}
}