Subj : Finger mod
To   : Finnigann
From : Angus McLeod
Date : Thu Jan 31 2008 10:05 pm

 Re: Finger mod
 By: Finnigann to All on Thu Jan 31 2008 19:40:00

> Below is the Finger client from SBBS. I want to know how to add code to
> save the dest.slice from each request to be recalled with a (perhaps)
> TAB keystroke or someother keystroke pair.

Where it says

       host = dest.slice(hp+1);

the string 'host' contains everything after the '@'.  You should be able
to save it ('host') at that point, if you want to recall it later.  You'd
need to open a file, write 'host' to disk, and close the file again.  Note
that the contents of 'host' is obtained by grabbing everything after the
'@' in string 'dest'.

A few lines later, in the code, you see that string ('host') being used to
connect to the remote system:

       sock.connect(host,"finger")

(It's imbedded in an 'if' statement.)  Prior to this, you can set 'host'
to whatever you like.  Or you can manipulate the end of the 'dest' string
to whatever you want *prior* to slicing off the host portion.  Same
effect.

The host portion of 'dest' already defaults to system.host_name (your own
system) if you leave off the '@'.  So if you just put

       .nodelist

the code adds "@yourdomain.com" automatically.  You can see it doing that
here:

       dest += "@" + system.host_name;

Nothing to prevent you adding extra code to use something else!  Like if
you put

       .nodelist*

the code could look up the last 'host' you used (open the disk file and
read the contents), and substitute that.

If you really want to do some coding, you could even invoke some sort of
pick-list routine, that sets the 'dest' string according to your pick.
The '*' at the end might cause the pick-list to pop up.

You can do pretty much what you want, you know.  But the more you want,
the more coding is involved, and the harder it gets.

---
Playing: "Peaches & diesel" by "Eric Clapton" from the "Slowhand" album.
� Synchronet � Making sure Jason works OK at The ANJO BBS