home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
n
/
newscr.zip
/
NEWSCR.EXE
/
DISCONCT.SCR
< prev
next >
Wrap
Text File
|
1993-01-11
|
2KB
|
112 lines
!------------------------------------------------------------!
! Disconnect Script: !
! !
! Handles all network/modem disconnections !
! %LOCAL = 1 if hanging up while network script running !
! = 2 if hanging up before connection !
! !
! $Revision:: 1.15 $ !
! !
!------------------------------------------------------------!
WaitTime = 10;
attempts = 0;
ifndef %LOCAL = 0;
if %LOCAL = 1 goto Do_Local_Hangup;
if %LOCAL = 2 goto Send_Hangup;
CompuServe = 1;
SprintNet = 2;
CSIRnet = 16;
Direct = 19;
if %Network = CompuServe goto Hangup_CIS;
if %Network = Direct goto Hangup_Complete;
if %Network = SprintNet goto Hangup_SprintNet;
if %Network = CSIRnet goto Hangup_CSIRnet;
goto Do_Local_Hangup;
Hangup_CIS:
Wait_Host = 80;
Start_Wait:
wait
"Host Name:" goto Send_Bye,
%mdm_Failure goto Hangup_Complete
until Wait_Host;
goto Do_Local_Hangup;
Send_Bye:
send "BYE^M";
goto Wait_NO_CARRIER;
Hangup_SprintNet:
show "Disconnecting from SprintNet";
wait
"disconnected" goto Send_Sprint_Hangup
until 60;
goto Do_Local_Hangup;
Send_Sprint_Hangup:
wait until 3;
send "HANGUP^M";
goto Wait_NO_CARRIER;
Hangup_CSIRnet:
show "Disconnecting from CSIR-Net";
wait until 40;
send "Z";
Wait_NO_CARRIER:
wait
%mdm_Failure goto Hangup_Complete
until 80;
Do_Local_Hangup:
wait until 2 * WaitTime;
sendm %mdm_EscapeCode;
wait until 2 * WaitTime;
wait
%mdm_Ack goto End_Escape_Wait,
%mdm_Failure goto Hangup_Complete
until 10;
End_Escape_Wait:
wait until WaitTime;
Send_Hangup:
sendm %mdm_Prefix;
sendm %mdm_Hangup;
sendm %mdm_Suffix;
attempts = attempts + 1;
wait
%mdm_Ack goto Small_Pause,
%mdm_Failure goto Small_Pause
until 15;
if attempts = 2 goto Small_Pause;
goto Do_Local_Hangup;
Small_Pause:
wait until WaitTime;
Hangup_Complete:
Result = %Cancel;
if %LOCAL > 0 goto Exit_Script;
call %Dir & "last.scr" () : Result;
Exit_Script:
exit Result;