home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
internet
/
slipdial_1
/
!Slipdial
/
Scripts
/
celtic
next >
Wrap
Text File
|
1996-02-02
|
3KB
|
152 lines
#slipdial Celtic internet services ltd
# written by tor houghton (torh@celtic.co.uk), august 1995
# version 0.00
#
# make sure you change YOURHOST and YOURPASSWORD in the
# 'configure' subroutine
#
# --------------------------------------------------------------
call initialise
call configure
call setserial
call makemenu
# --------------------------------------------------------------
# main loop (idling, waiting for someone to click a menu)
:mainloop
message /close
wait /event
goto mainloop
exit
# --------------------------------------------------------------
# dialing routine (i know this is going to be a serious
# pain in the backside)
:dialit
# claim device driver
if (!claim 3) return 0
# initialise modem
init
# dial the number, return to menu if failed
retry %nretries 15
if (!dial /nodial=15 /nocar=25 /busy=1 %phonenumber) return 0
# if the dial succeeded, we should be here in the script
# (oh, we are hopeful today)
if (!wait /del=25 ogin:) goto failed_login
send %nodename
if (!wait /del=25 word:) goto failed_passwd
send %password
if (!wait /del=25 enabled) goto failed_enabled
# ok, assuming this is correct, we should now fire up the
# freenet tcp/ip stack here
oscli <FreeUser$Dir>.Startup
# look for data carrier detect to go low (e.g. hangup)
alarm /dcd "goto exit_hangup"
:dialit_loop
wait /event
goto dialit_loop
# --------------------------------------------------------------
# failed at the login detect
:failed_login
message "Failed to detect login prompt, exiting..." /centre
release
reinit
return 0
# --------------------------------------------------------------
# failed after entering login
:failed_login
message "Failed to detect password prompt, exiting..." /centre
release
reinit
return 0
# --------------------------------------------------------------
# failed detecting "packet mode enabled"
:failed_login
message "Failed to detect 'packet mode', exiting..." /centre
release
reinit
return 0
# --------------------------------------------------------------
# hey! we're optimistic today!
:exit_hangup
oscli <FreeUser$Dir>.Shutdown
message /close
message "Call completed." /centre
release
pause 2
return 1
# now, in the original script, this is where you start your
# mail and news clients. maybe i'll do that later.
# insert your commands to start news/mail here
# --------------------------------------------------------------
# cardiff point of presence (pop)
:CF
set nretries 25
set phonenumber 01222340420
goto dialit
return
# --------------------------------------------------------------
# set up the menu in slipdial
:makemenu
menu "Cardiff:call CF"
return 1
# --------------------------------------------------------------
# configure serial settings
:setserial
driver USR
port %wport %prtnum
speed %speed
# not sure if we need this
set protocol slip
return 1
# --------------------------------------------------------------
# configuration subroutine
:configure
set wport Internal
set portnum 0
set speed 0
set nodename YOURHOST.celtic.co.uk
set password YOURPASSWORD
return 1
# --------------------------------------------------------------
# subroutine general initialisation - not much is here at the moment
:initialise
debug 3
return 1