!
! InterSLIP gateway script for Dialups terminal server for Atari
!
! Label 99 is the general purpose error handler, which beeps
! and pause long enough for the user read the message.
!
! First, we wait for the name prompt
!
!
@originate
note "Waiting for prompt"
matchclr
matchstr 1 1 "login:"
matchread 50
note "No username prompt"
jump 99
!
! Now, send name and wait for the password prompt
!
@label 1
note "Sending user name"
write "^5\13"
matchclr
matchstr 1 2 "password:"
matchread 50
note "No password prompt"
jump 99
!
! Send the password and wait for either the terminal server
! SLIP string or an error message
!
@label 2
note "Sending Password"
write "^6\13"
matchclr
matchstr 1 4 "SLIP"
matchread 120
jump 99
!
! If we got an error message, notify the user and fail
!
@label 3
note "Access denied."
!
! General purpose error handler. Let the message appear,
! beep, and then pause for a second.
!
@label 99
pause 1
sound
pause 60
exit -1
!
! We've entered SLIP mode, so match on the first thing that
! looks like an IP address. If we don't find one, fail.
!
@label 4
note "Scan for IP address."
matchclr
matchexp 1 5 "[0-9]*\\.[0-9]*\\.[0-9]*\\.[0-9]*"
matchread 120
note "No IP address given"
jump 99
!
! We've found an IP address, so inform MacTCP of it.
!
!
@label 5
setip "^0"
matchclr
note "^0"
!
! Answer and Hangup modes are currently unused in gateway
! script, but just for futur compatibility, exit successfully.
!
@answer
@hangup
@exit 0
