i am working on my first tcl script, basically another "notes" script(pseudobnc). the scripts worked alright when i only had one mailbox runnuing. i now added a command so that anyone can create a mailbox with password. for each user, a seperate msg file is created. all passwords and usernames are stored in one file. that also works with no probs.
i now want to add a command so that people can sent msgs to specified users.
bind pub - ${pbchar}${pbstorecommand} storetext
how do i create a variable which users have to define after the storecommand? something like:
($user = user the msg should go to)
($msg = message)
.pbstore <$user> <$msg>
(i tried out some stuff with lindex, but couldn't get it work...)
i also want to use the $user var, to define the file the message is stored in...
set addmsg [open $pbsource$user a+]
Sorry if that question is answered elsewhere. there where too many matches when i searched for tcl ver variable etc...i looked through loads of scripts to get an idea how this might work...plz help me
siyb