home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 5
/
DATAFILE_PDCD5.iso
/
internet
/
starterpck
/
!SLIPdial
/
Scripts
/
call_umn
next >
Wrap
Text File
|
1995-04-11
|
3KB
|
141 lines
#slipdial
debug 1
call configure
icon/file=<slipdial$resources>.mailboxes
alarm /repeat /time=04:30 /id=everyday "call doall"
#alarm /stop="goto loop"
port sp_dual 0;speed 57600;retry 3 30
# main loop
:loop
unset ipaddress
menu "Start All:call doall" "Start Mail:call domail" -
"Start News:call donews" -
"Interactive:call dointer" -
"Freenet:call freenet" -
"Debatch:call endcall" -
"Setup:call setup1"
wait /event
goto loop
exit
# dial up & enter SLIP mode
:dialup
if (!claim 3) goto dialup
message/close
init ATZQ0V1M0
retry 2 4
if (!dial/retry=50/delay=5/nodial=60 6261920) return 0
message/capture="This"/centre/max=5
# set username & password for authentication
set username allan@mnhep1.hep.umn.edu
:waitloop
set result {wait /del=120 name: word: server> denied}
case %result
when 0; endcase; goto dialup
when 1; send %username
when 2; send %password
when 3; endcase; goto endwaitloop
when 4; set username alla0008@gold.tc.umn.edu
endcase
if (!?line/dcd) goto dialup
goto waitloop
:endwaitloop
send slip
if (!ipget/del=30/auto) goto dialup
return 1
# start a session for all activities (smtp, nntp)
:doall
set nntp nntp
set pop pop
set hanguptime "30 4"
call/lock dialup
goto common
# start a session for mail only
:domail
set nntp #nntp
set pop pop
set hanguptime "30 4"
call/lock dialup
goto common
# start interactive session
:dointer
set nntp #nntp
set pop #pop
set hanguptime "600 2 2"
call/lock dialup
goto common
# start freenet session
:freenet
set nntp #nntp
set pop #pop
set hanguptime "600 2 2"
call/lock dialup
oscli "set inet$address %ipaddress"
oscli "set inet$route %route"
message/close
task <freeuser$dir>.startup
:hup2wait
wait /event
goto hup2wait
goto common
# start a session for news only
:donews
set nntp nntp
set pop #pop
set hanguptime "30 4"
call/lock dialup
:common
make SLIPdial:umnsrc <TCPIP$Dir>.AutoExec
message/close
:starttcp
task/exit="if (?line/dcd) goto starttcp"/id="TCPIP" <TCPIP2$dir>.!Run
alarm/dcd "goto tcpkill"
:hupwait
wait /event
goto hupwait
:tcpkill
task /kill="TCPIP"
# routine to end call & test for arrived files
:endcall
release
if (!?task NewsBase) task <NewsBase$dir>.!run
return
:trimfile
if (?lt {?file/size %p1} 10000) return
echo/status "Trimming %p1"
copy/tail=350 %p1 %p1-T;delete %p1;move %p1-T %p1
return
#
# This loads password config from file or prompts for data to create file.
#
:configure
set filename {?file/expand slipdial:umnconfig}
if (!?file %filename) call setup1
open/read/id=conf/error="return" %filename
read/id=conf/eof="goto closeconf" password
read/id=conf/eof="goto closeconf" gtapass
read/id=conf/eof="goto closeconf" efppass
:closeconf
close/id=conf
return
:setup1
input/prompt="Enter authorization password:" password
input/hide/prompt="Enter gta password:" gtapass
input/prompt="Enter efppass:" efppass
open/id=conf/write %filename
write/id=conf %password
write/id=conf %gtapass
write/id=conf %efppass
close/id=conf
return