This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

question ??

Old posts that have not been replied to for several years.
Locked
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

question ??

Post by Ofloo »

if i do mirc scripting and i use on text in a query window i trigger on a word like:

/msg bot test hello there

Code: Select all

on *:text:*test*:?:{
msg $nick $1 $2
}
if i do it in tcl how would the $1 and $2 work ?? these vars are not set ??
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

You can't do mirc scripting.

Try this:

Code: Select all

bind msg - test test_msg

proc test_msg {nick host handle args} {
set args [lindex $args 0]
set words [lrange $args 0 end]
putserv "PRIVMSG $nick :$words"
return 1
}
This will make your bot to MSG the user and tell him exactly what he said after the test, as the word test is the command.
See more in the tcl-commands.doc
«A fantastic spaghetti is a spaghetti that does not exist»
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

You should realy understand, that once you know one language, it doesn't mean you know them all.

Just because mIRC uses these identifiers, it doesn't mean Tcl, or any other language should (no matter how related to IRC).

You should take time to studyy some of the greate guides to scripting, available in the Links section of egghelp.org, and via the FAQ forum on this board.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

read my question i asked if it was used the same way i know mirc so i refered to it to make my self clear, but i havn't got an answer to my question yet .. ?? or i don't understand what your talking about give me a syntax and some explanation what you write there can be anything don't want a solution i want to know how to do it my self .. don't mean wrong just hard to understand what vars u use .. i don't know nothing about tcl and i want to know how it is used. the mirc script is just an example i don't want to forward a msg to an other user. but it is easy to refer to
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

You did get an answer, you just need to do a little more reasrchy on it though.

Code: Select all

$1 = [lindex <word list> 0]
$2 = [lindex <word list> 1]
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

hmm i see tnx, sorry ;)
Locked