Overview
| Artifact ID: | 11562835eb319c9039a67b8c69242a844e5ffbd7 |
|---|---|
| Ticket: | 1065440fffffffffffffffffffffffffffffffff
proc - bind MSG - args - invalid. |
| User & Date: | nobody on 2004-11-12 21:18:13 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
per docs at http://www.tcl.tk/man/tcl8.4/TclCmd/proc.htm it states: "If the last formal argument has the name args, then a call to the procedure may contain more actual arguments than the procedure has formals" This is a false statement if the proc is binded to a msg. It only will work if it is "arg" not "args". in a real example: bind msg -|- !test test proc test { nick host hand args } { set myvar1 [lindex $args 0] set myvar2 [lindex $args 1] set myvar3 [lindex $args 2] puthelp "PRIVMSG $nick :myvar1=$myvar1 myvar2=$myvar2 myvar3=$myvar3" } when attached to eggdrop, i receive this. [14:14] <nick> !test testing this script [14:14] <eggdrop> myvar1=testing this script myvar2= myvar3= if i change the script to: bind msg -|- !test test proc test { nick host hand arg } { set myvar1 [lindex $arg 0] set myvar2 [lindex $arg 1] set myvar3 [lindex $arg 2] puthelp "PRIVMSG $nick :myvar1=$myvar1 myvar2=$myvar2 myvar3=$myvar3" } I receive this. [14:18] <nick> !test testing this script [14:18] <eggdrop> myvar1=testing myvar2=this myvar3=script contact info [email protected] - foundin changed to: "obsolete: 8.4.7"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "18. Commands M-Z"
- title changed to: "proc - bind MSG - args - invalid."
- type changed to: "Bug"