home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1998 February / PCOnline_02_1998.iso / filesbbs / frei / winsock.arj / BYE.CM_ / BYE
Encoding:
Text File  |  1996-09-05  |  847 b   |  41 lines

  1. #
  2. #  Trumpet Winsock 3.0 Bye.cmd
  3. #
  4. #  Copyright (C) 1996 distributed by
  5. #  Trumpet Software International Pty Ltd 
  6. #  A.C.N 070065860
  7. #  Under Licence from the Copyright owners.
  8. #  All Rights Reserved.
  9. #
  10. #
  11. #  Set %which to 1 for normal DTR hang up or 
  12. #                2 for ATH style hangup
  13. #
  14. include "modem.cmd","preload"
  15. %which = 2
  16. status "Disconnecting modem..."
  17. if %which = 1
  18.   set dtr off
  19.   sleep 2
  20.   set dtr on
  21. end
  22. if %which = 2
  23.   # set the hangup string to a sensible value in case user 
  24.   # has blanked it out by mistake.  Otherwise modem will not
  25.   # hang up.
  26.   if trim($modemhangup) = ""
  27.     $modemhangup = "h"
  28.   end
  29.   sleep 2
  30.   output +++
  31.   if ![input 1 +++]
  32.     %ok = [input 5 OK\n]
  33.   else
  34.     output \n
  35.   end
  36.   output at$modemhangup\r
  37.   input 5 OK\n
  38. end
  39. status "Modem has been disconnected."
  40.  
  41.