home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / modem / tm3dhost.zip / TM3DHCFG.SCR < prev    next >
Text File  |  1993-09-28  |  11KB  |  338 lines

  1. ; This is a Revised Telemate 4.12 Hconfig Script
  2. ; It's new Name should read "H3DTMCFG.SCR" This is version 1
  3. ; There are now "Nine" Levels of Security to select from!
  4. ; This Script was Revised by "Edward Kapuscinski Jr".
  5. ;
  6. ; The script files that run the show in this host have had their names
  7. ; changed along with there code. (Hconfig.hst) = (H3dtmcfg.hst)
  8. ; (HOST.SCR) = (TM3DHOST.SCR), (Hconfig.scr) = (TM3DHCFG.scr)
  9. ; (HUSER.HST) = (TM3DPASS.HST). And thier Menus also.
  10. ; This was done so as not to cause confusion in having (Two Host) in the 
  11. ; Same directory. That's right, You can NOW have both.
  12. ;
  13. ; Like in the Tm3Dhost script, Everything that was changed is
  14. ; marked with an * asterisk in the comment line like the ones below.
  15. ;
  16. NEWUSER = 1                  ; * Upload command not availible here
  17. TMUSER = 2                   ; * Upload command is availible here
  18. SILVER = 3                   ; * To use these alternate levels.
  19. GOLD = 4                     ; * Assign them to the caller in the
  20. LEVEL5 = 5                   ; * file "Huser.hst" as his "UserLevel"
  21. LEVEL6 = 6                   ; * From then on, He, the user will see that
  22. LEVEL7 = 7                   ; * Menu and not the TmUser Menu.
  23. LEVEL8 = 8                   ; * That's all there's to it.
  24. SYSOP = 9                    ; * New Sysop Level Now 9
  25. DETECTBAUD = 1               ; set to 0 if COM baud rate is locked
  26. query baud,INITIALBAUD       ; initial baud rate (highest baud rate)
  27. YELLTIME = 3                 ; amount of time to display the alarm
  28. YELLSOUND = 1                ; amount of time to ring the alarm
  29. query dirtelemate,HOSTDIR    ; directory holding *.HST
  30. query dirupload,DOWNLOADDIR  ; host download directory
  31. query dirdownload,UPLOADDIR  ; host upload directory
  32. CLOSESYSTEM = 0              ; set to 1 if close system
  33.  
  34. COMPORT = "1"
  35. ; * ----------- Procedure Break --------------
  36.    procedure Pause
  37.    string ch
  38.    print
  39.    print "Press [Enter] to continue ",
  40.    repeat
  41.       inputch ch
  42.    until success
  43.    print
  44.    print
  45.    endproc
  46. ; * ----------- Procedure Break --------------
  47. open "HSHELL.BAT"            ; [S]hell batch file
  48. if not success
  49.    print
  50.    print
  51.    print "Which COM port is your modem connected to  (1-8) ?   COM",
  52.    repeat
  53.      inputch COMPORT
  54.      if success
  55.         print COMPORT
  56.         strpos "12345678",COMPORT,pos
  57.         if pos=0
  58.            print "Which COM port is your modem connected to  (1-8) ?   COM",
  59.         endif
  60.      endif
  61.    until success and pos>0
  62.    print
  63.    if COMPORT<>"1" and COMPORT<>"2"
  64.       print "Due to DOS limit, only COM1 and COM2 is supported for"
  65.       print "the [S]hell command in host mode.  However, you may"
  66.       print "create your own HSHELL.BAT and use a third-party program,"
  67.       print "such as DOORWAY, which allows you to use COM",COMPORT
  68.    else
  69.       create "HSHELL.BAT"
  70.       if success
  71.          print "Creating HSHELL.BAT, the batch file for [S]hell command"
  72.          write "CTTY COM",COMPORT
  73.          write "COMMAND"
  74.          write "CTTY CON"
  75.          write "EXIT"
  76.          close
  77.       else
  78.          print "Cannot to create HSHELL.BAT"
  79.       endif
  80.    endif
  81.    Pause
  82. else
  83.    close                     ; already exist, skip it
  84. endif
  85.  
  86. open "TM3D_CFG.HST"
  87. string s
  88. if success
  89.    read s
  90.    atoi s,NEWUSER            ; new user level
  91.    read s
  92.    atoi s,TMUSER             ; * MAIN MENU
  93.    read s                    ; *
  94.    atoi s,SILVER             ; * Alternate levels can be used as sub-menus
  95.    read s                    ; * by assigning a userlevel to a perticular menu.
  96.    atoi s,GOLD               ; * Then calling that userlevel from One of other menu's
  97.    read s                    ; * as an option. They can also be assigned to other Scripts.
  98.    atoi s,LEVEL5             ; * The "Power" of this Host Script is not known yet. Since it has
  99.    read s                    ; * so many levels of Security. The Sysop can do anything that he
  100.    atoi s,LEVEL6             ; * wishes to.
  101.    read s                    ; *
  102.    atoi s,LEVEL7             ; *
  103.    read s                    ; *
  104.    atoi s,LEVEL8             ; *
  105.    read s                    ; *
  106.    atoi s,SYSOP              ; * New sysop level
  107.    read s                    ;
  108.    atoi s,DETECTBAUD         ; detect baud rate
  109.    read s
  110.    atoi s,INITIALBAUD        ; initial baud rate
  111.    read s
  112.    atoi s,YELLTIME           ; yell time
  113.    read s
  114.    atoi s,YELLSOUND          ; yell sound
  115.    read HOSTDIR              ; directory containing H*.HST
  116.    read DOWNLOADDIR          ; download directory
  117.    read UPLOADDIR            ; upload directory
  118.    read s
  119.    atoi s,CLOSESYSTEM        ; open or close system
  120.    close
  121. endif
  122.  
  123. finish = 0
  124. while not finish
  125.    clear text
  126.    print "A: TeleMate New User   : ",NEWUSER        ; *
  127.    print "B: TeleMate Main Menu  : ",TMUSER         ; *   This is the standard menu
  128.    print "C: TeleMate Silver     : ",SILVER         ; *   Name these alternate
  129.    print "D: TeleMate Gold       : ",GOLD           ; *   levels according to
  130.    print "E: TeleMate Level 5    : ",LEVEL5         ; *   use, Util for utils
  131.    print "F: TeleMate Level 6    : ",LEVEL6         ; *   or Wendy just for her!
  132.    print "G: TeleMate Level 7    : ",LEVEL7         ; *   They can also be assigned
  133.    print "H: TeleMate Level 8    : ",LEVEL8         ; *   to scripts which have many levels
  134.    print "I: Telemate SySop      : ",SYSOP          ; *
  135.    print "J: Detect Baud Rate    : ",
  136.    if DETECTBAUD
  137.       print "ON"
  138.    else
  139.       print "OFF"
  140.    endif
  141.    print "K: Initial Baud Rate   : ",INITIALBAUD
  142.    print "L: Yell Time           : ",YELLTIME," seconds"
  143.    print "M: Yell Sound          : ",YELLSOUND," seconds"
  144.    print "N: Host Directory      : ",HOSTDIR
  145.    print "O: Download Directory  : ",DOWNLOADDIR
  146.    print "P: Upload Directory    : ",UPLOADDIR
  147.    print "R: Close System        : ",
  148.    if CLOSESYSTEM
  149.       print "ON"
  150.    else
  151.       print "OFF"
  152.    endif
  153.    print "   ------------------------------------"   ; *
  154.    print "S: Save Configuration and Run Host Mode"
  155.    print "Q: Abort Configuration"
  156.    print "   ------------------------------------"   ; *
  157.    print "Which option: ",
  158.    repeat
  159.       inputch ch
  160.    until success
  161.    print ch
  162.    print
  163.  
  164.    switch ch
  165.       case "A":
  166.          print "Enter New User Security Level: ",     ; *
  167.          input s
  168.          ss = ""
  169.          concat ss,s
  170.          if ss<>""
  171.             atoi ss,NEWUSER
  172.          endif
  173.       case "B":
  174.          print "Enter Main Menu Security Level: ",      ; *
  175.          input s
  176.          ss = ""
  177.          concat ss,s
  178.          if ss<>""
  179.             atoi ss,TMUSER
  180.          endif
  181.       case "C":
  182.          print "Enter Silver Security Level: ",        ; *
  183.          input s
  184.          ss = ""
  185.          concat ss,s
  186.          if ss<>""
  187.             atoi ss,SILVER
  188.          endif
  189.       case "D":
  190.          print "Enter Gold Security Level: ",        ; *
  191.          input s
  192.          ss = ""
  193.          concat ss,s
  194.          if ss<>""
  195.             atoi ss,GOLD
  196.          endif
  197.       case "E":
  198.          print "Enter Level 5 Security Level: ",        ; *
  199.          input s
  200.          ss = ""
  201.          concat ss,s
  202.          if ss<>""
  203.             atoi ss,LEVEL5
  204.          endif
  205.       case "F":
  206.          print "Enter Level 6 Security Level: ",        ; *
  207.          input s
  208.          ss = ""
  209.          concat ss,s
  210.          if ss<>""
  211.             atoi ss,LEVEL6
  212.          endif
  213.       case "G":
  214.          print "Enter Level 7 Security Level: ",        ; *
  215.          input s
  216.          ss = ""
  217.          concat ss,s
  218.          if ss<>""
  219.             atoi ss,LEVEL7
  220.          endif
  221.       case "H":
  222.          print "Enter Level 8 Security Level: ",        ; *
  223.          input s
  224.          ss = ""
  225.          concat ss,s
  226.          if ss<>""
  227.             atoi ss,LEVEL8
  228.          endif
  229.       case "I":
  230.          print "Enter SYSOP Security Level: ",         ; *
  231.          input s
  232.          ss = ""
  233.          concat ss,s
  234.          if ss<>""
  235.             atoi ss,SYSOP
  236.          endif
  237.       case "J":
  238.          DETECTBAUD = not DETECTBAUD
  239.       case "K":
  240.          print "Enter initial baud rate: ",
  241.          input s
  242.          ss = ""
  243.          concat ss,s
  244.          if ss<>""
  245.             atoi ss,baud
  246.          endif
  247.          switch baud
  248.             case   300: INITIALBAUD = baud
  249.             case  1200: INITIALBAUD = baud
  250.             case  2400: INITIALBAUD = baud
  251.             case  4800: INITIALBAUD = baud
  252.             case  9600: INITIALBAUD = baud
  253.             case 19200: INITIALBAUD = baud
  254.             case 38400: INITIALBAUD = baud            ; *
  255.             otherwise : print
  256.                         print "Invalid value"
  257.                         print
  258.                         Pause
  259.          endswitch
  260.       case "L":
  261.          print "Enter yell time (0 to turn off): ",
  262.          input s
  263.          ss = ""
  264.          concat ss,s
  265.          if ss<>""
  266.             atoi ss,YELLTIME
  267.          endif
  268.       case "M":
  269.          print "Enter yell sound length (0 to turn off): ",
  270.          input s
  271.          ss = ""
  272.          concat ss,s
  273.          if ss<>""
  274.             atoi ss,YELLSOUND
  275.          endif
  276.       case "N":
  277.          print "Enter Host directory which contains H*.HST: ",
  278.          input s
  279.          ss = ""
  280.          concat ss,s
  281.          if ss<>""
  282.             HOSTDIR = ss
  283.          endif
  284.       case "O":
  285.          print "Enter host download directory: ",     ; * in future try to add
  286.          input s                                      ; * directory just for host
  287.          ss = ""                                      ; * u/l * d/l files.
  288.          concat ss,s
  289.          if ss<>""
  290.             DOWNLOADDIR = ss
  291.          endif
  292.       case "P":
  293.          print "Enter host upload directory: ",
  294.          input s
  295.          ss = ""
  296.          concat ss,s
  297.          if ss<>""
  298.             UPLOADDIR = ss
  299.          endif
  300.       case "R":
  301.      CLOSESYSTEM = not CLOSESYSTEM
  302.       case "S":
  303.          delete "TM3D_CFG.HST"
  304.          create "TM3D_CFG.HST"
  305.          if not success
  306.             print "Cannot create TM3D_CFG.HST"
  307.             print "Configuration aborted"
  308.             finish = 1
  309.          else
  310.             write NEWUSER
  311.             write TMUSER                              ; *
  312.             write SILVER                              ; *
  313.             write GOLD                                ; *
  314.             write LEVEL5                              ; *
  315.             write LEVEL6                              ; *
  316.             write LEVEL7                              ; *
  317.             write LEVEL8                              ; *
  318.             write SYSOP                               ; *
  319.             write DETECTBAUD
  320.             write INITIALBAUD
  321.             write YELLTIME
  322.             write YELLSOUND
  323.             write HOSTDIR
  324.             write DOWNLOADDIR
  325.             write UPLOADDIR
  326.         write CLOSESYSTEM
  327.         close
  328.             print "Configuration completed"
  329.             Pause
  330.             print "Starting host mode"
  331.             script "TM3DHOST"
  332.          endif
  333.       case "Q":
  334.          print "Configuration aborted"
  335.          finish = 1
  336.    endswitch
  337. endwhile
  338.