home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
f
/
finet93a.zip
/
SCRIPTS.ZIP
/
FINET1.SLT
next >
Wrap
Text File
|
1993-01-01
|
4KB
|
132 lines
// this is provided by one of FINET's nodes
// REPLACE occurences of the word "node" with your node id.
// used by showname():
//
int statline = 49; // Telix status line row
int statback = 4; // status line background color
int statfore = 14; // status line foreground color
str node_path[] = "C:\TRANSFER\NODE.RLY";
str number_to_dial[] = "29";
int times_to_dial = 5;
str capfile[] = "ON";
str cap_filename[] = "FINET.CAP";
str usefile[] = "ON";
str use_filename[] = "FINET.USE";
str failed[] = "Logon failed.";
main()
{
// make backup copy of mail upload packet, "NODE.rly"
dos("copy c:\transfer\NODE.rly d:\pcrelay\fibak\rly.sav",0);
dial_hub();
logon();
backup();
}
dial_hub()
{
if (capfile=="ON") capture(cap_filename);
if (usefile=="ON") usagelog(use_filename);
dial(number_to_dial,times_to_dial,1);
if (carrier())
{
return;
}
else
{
status_wind("Unable to connect",50);
hangup();
exittelix();
}
}
// main routine
//
logon()
{
alarm(1);
showname();
if (! waitfor("RST name?", 60))
{
prints(failed);
return;
}
delay(2);
cputs("fname;lname;password;!;D;FIHUB;/G^M");
if (! waitfor("fe64", 60))
{
prints(failed);
return;
}
delay(2);
status_wind("Sending Packet",10);
send('Z',node_path);
if (! waitfor("**", 800))
{
prints(failed);
return;
}
delay(2);
status_wind("Receiving Packet",10);
receive('Z',"");
return;
}
backup()
{
// make backup of old in.rly packet, if exists
// we assume that dsz is used and overwrite is enable of new file over
// old file in.rly.
status_wind("making backup of in.rly packets",20);
dos("if exist d:\pcrelay\fibak\in.2 copy d:\pcrelay\fibak\in.2 d:\pcrelay\fibak\in.3",0);
dos("if exist d:\pcrelay\fibak\in.2 del d:\pcrelay\fibak\in.2",0);
dos("if exist d:\pcrelay\fibak\in.1 ren d:\pcrelay\fibak\in.1 d:\pcrelay\fibak\in.2",0);
// make backup of present in.rly packet
dos("copy c:\transfer\in.rly d:\pcrelay\fibak\in.1",0);
hangup();
exittelix();
return;
}
// Function: showname
// Description: Displays the name of the system you're connected to, or
// "Alt-Z for Help" if you're not connected to anything.
//
// You can plug this into ANY logon script file, just call it
// as shown in main().
//
// This routine will overwrite the "Alt-Z for Help" message,
// but I think it's worth it. If you don't like this feature,
// set the Anonymous option in SLCONFIG to 'y' (YES).
// Parameters: none
// Returns: nothing
//
showname()
{
str name[14]; // name to display
int x, y; // old cursor position
x = getx(); // save current position
y = gety(); //
substr(_entry_name, 0, 14, name); // get the current BBS name
if ((strlen(name) == 0) || (! carrier())) // no name or not connected?
name = "Alt-Z for Help"; // then display help message
strcat(name, " "); // pad name with spaces
pstraxy( name, 1, statline, // display it
(statback * 16) + statfore
);
gotoxy(x, y); // return to saved position
}