home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / HOLONET.CMD < prev    next >
Encoding:
Text File  |  1996-02-15  |  2.1 KB  |  128 lines

  1. #    login.cmd file for connecting to HoloNet via Trumpet Winsock
  2. #
  3. #trace on
  4. #
  5. # set up some strings for dialling up
  6. #
  7. if ![load $number]
  8.   if [query $number "THE_ACCESS_NUMBER_YOU_ARE_USING"]
  9.     save $number
  10.   end
  11. end
  12. if ![load $username]
  13.   if [username "YOUR_HOLONET_MEMBER_NAME"]
  14.     save $username
  15.   end
  16. end
  17. if ![load $password]
  18.   if [password "YOUR_HOLOIP_PASSWORD"]
  19.     save $password
  20.   end
  21. end
  22. if ![load $modemsetup]
  23.   if [query $modemsetup "YOUR_MODEM_INIT_STRING"]
  24.     save $modemsetup
  25.   end
  26. end
  27. $hostname = "e:"
  28. $service = "holoip"
  29. $userprompt = "ember"
  30. $passprompt = "sword"
  31. $prompt = "erminal"
  32. $slipcmd = "slip"
  33. $addrtarg = "Your address is"
  34. $pppcmd = "ppp"
  35.  
  36. %attempts = 10
  37. #
  38. #
  39. #----------------------------------------------------------
  40. #
  41. # initialize modem
  42. #
  43. output "atz"\13
  44. if ! [input 10 OK\n]
  45.   display "Modem is not responding"\n
  46.   abort
  47. end
  48. #
  49. # setup our modem commands
  50. #
  51. output "at"$modemsetup\13
  52. input 10 OK\n
  53. #
  54. # send phone number
  55. #
  56. %n = 0
  57. repeat
  58.   if %n = %attempts
  59.     display "Too many dial attempts"\n
  60.     abort
  61.   end
  62.   output "atdt"$number\13
  63.   %ok = [input 60 CONNECT]
  64.   %n = %n + 1
  65. until %ok
  66. input 10 \n
  67. #
  68. #  wait till it's safe to send because some modem's hang up
  69. #  if you transmit during the connection phase
  70. #
  71. # wait 30 dcd
  72. #
  73. # now prod the terminal server
  74. #
  75. output \13
  76. # wait 30 dcd
  77. # output \13
  78. input 30$hostname
  79. output $service\13
  80. #
  81. #  wait for the username prompt
  82. #
  83.  
  84. input 30 $userprompt
  85. output $username\13
  86. #
  87. # and the password
  88. #
  89. input 30 $passprompt
  90. output $password\13
  91. #
  92. # we are now logged in
  93. #
  94. input 30 $prompt
  95. if %ppp
  96.   #
  97.   # jump into ppp mode
  98.   #
  99.   output $pppcmd\13
  100.   #
  101.   input 30 \n
  102.   #
  103.   display "PPP mode selected.  Will try to negotiate IP address."\n
  104.   #
  105. else
  106.   #
  107.   # jump into slip mode
  108.   #
  109.   output $slipcmd\13
  110.   #
  111.   # wait for the address string
  112.   #
  113.   input 30 $addrtarg
  114.   #
  115.   # parse address
  116.   #
  117.   #address 30
  118.   input 30 \n
  119.   #
  120.   # we are now connected, logged in and in slip mode.
  121.   #
  122.   display \n
  123.   display Connected.  Your IP address is \i.\n
  124. end
  125. display script completed\n
  126. #
  127. # now we are finished.
  128. #