There is one error that says that the arguments are wrong, what does this mean? And how should I change it? This is strange I think, because usually, when redesiged this script to use another command, like reading from a document, it works..

Here's the script:
Code: Select all
bind pub o ?access pub:traceroute
proc pub:traceroute {nick uhost hand chan text} {
set input [open "|/bin/traceroute $text" r]
while {![eof $input]} {
catch {set contents [gets $input]}
putserv "NOTICE $nick :$contents"
}
close $input
}

Code: Select all
Tcl error [pub:trace]: wrong # args: should be "catch command ?varName?"