hi,
if I'm right, you already opened a forum thread about this, why create yet another thread ? anyways.. also your thread should be in development forum not in support...
to answer you, yes, I understand now better.. but I don't know why you'd need a separate 'online2' proc... you can create a script that reads the input, like doing :
echo -ne "localhost\nUSERNAME\nPASSWORD\nonline\nquit\n" | ./amsn-remote-CLI | your_script
the script could read line by line from stdin (the output of amsn-remote-CLI since it's piped) and read until it finds the line 'online' which means the next lines will be the output of 'online' (until the line 'quit'), there, you could use sed or awk or whatever to get the first word from each line, actually, you could do a
echo $LINE | grep -e ".* - " -o | awk {whatever awk instruction to print the first word}
and there, you have the email of each contact...
anyways, as I said, you could write a function in remote.tcl that would call
eval ::myPlug::online2 $args
Also, having it as a plugin is a good idea, and you don't NEED to have your online2 proc inside the 'myplug' namespace... once your plugin is loaded, you can whatever you want, for example, you can have this code :
proc ::remote::online2 {} { ... .}
inside your plugin's code and the online2 function will become part fo the 'remote' namespace... nothing forces you to have it inside your namespace... look at the emotes plugin as a proof of concept to see how you can create whatever you want or hook existing procs if you want.
Another thing, you say you download amsn_dev.tar.gz every time... that's bad, it uses a lot of bandwidth, my suggestion is to use the 'svn' commands directly, this way a 'svn update' will be done in less than a second and your changes will be merged and you won't loose them (if a conflict happens, then you got a problem though, you'd need to fix it or to delete the file and redo 'svn update' then readd your changes)
read the sourceforge page to see how to use the svn command.