home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / COMM / MISC / JBHOST51.ZIP / JBHOST.MAC < prev    next >
Encoding:
Text File  |  1991-12-21  |  26.3 KB  |  611 lines

  1. Welcome to the COMMO HOST MODE version 5.1
  2. Written by Jeff Bishop
  3. Released to the public domain.
  4.  
  5. NOTE:   Some parts of this host have been developed from the MOSTHOST
  6.         package.  These include the autobaud detection and the chat mode.  ALL
  7.         other parts are original.  Credit is due in great appreciation to the
  8.         MOSTHOST author.
  9.  
  10. The next section of this macro contains all of the setup variables
  11. required.  Change the name and passwords before running the host.
  12. To use Zmodem or Ymodem make sure that DSZ.COM is in your DOS path.
  13. Xmodem is internal to COMMO.
  14.  
  15. Some external programs are required.  These are: RV 2.42,
  16. DOORWAY 2.21, HSLINK 10D5 and DSZ/GSZ. Please make sure that the options you
  17. use from the menu have the supporting programs or else COMMO macro errors
  18. will occur.
  19.  
  20. The supporting programs are registered trademarks of their respective
  21. corporations.
  22.  
  23. ********************************************************************************
  24. The following section sets up the necessary variables and options for the
  25. JBHOST. Please make sure that these are set to your appropriate
  26. settings.
  27. ********************************************************************************
  28.  
  29. {:setup}   {sete quit}
  30.            {setv autobaud,Y}           Allow autobaud detection
  31.            {setv dpass,shell}          DOS PASSWORD for DOS menu
  32.            {setv i_time,0}             Inactive timeout setting
  33.            {setv level,0}              level for new users, 0=basic, 1=sysop level
  34.            {setv minutes,0}            Allowed minutes online (0 means no limit)
  35.            {setv pdir,c:\com\}       DSZ DRIVER DIRECTORY
  36.            {SETV sdir,C:\COM}        STARTING DIRECTORY
  37.            {setv spass,shutdown}       Regular shutdown password
  38.            {EXEC CD %sdir} {setv sdir} Change to startup directory
  39.  
  40. ********************************************************************************
  41. The next section starts the main body of the host mode.
  42. ********************************************************************************
  43.  
  44. {:HOST}    {setv novice,Y} {loca N} {spoc Y} {SEND AT|} {paus 2}
  45. {:HOST2}   {loca n} {clea}
  46.            {disp 1,1,,^(COMMO^) is in Host Mode.}
  47.            {disp 2,1,,^(ESC^) to halt the host.}
  48.            {disp 3,1,,^(1^)   for local login mode.}
  49.            {disp 4,1,,^(2^)   to go to main menu locally}
  50.            {disp 5,1,,^(3^)   to view scroll back buffer}
  51.            {disp 6,1,,^(4^)   to change time limit allowed online}
  52.            {disp 7,1,,^(5^)   Set Timeout value}
  53.            {disp 8,1,,^(q^)   to exit host.} {disp 9,1}
  54.  
  55. ********************************************************************************
  56. The next section handles the processing of the ring/options entered.
  57. ********************************************************************************
  58.  
  59. {:rng1}    {setg 0,,L} {setv rng} {gets rng,6,rng1}
  60.            {comp rng,1} {ifco sysop}
  61.            {comp rng,2} {ifco dolocal}
  62.            {comp rng,3} {ifco dscroll}
  63.            {comp rng,4} {ifco limit}
  64.            {comp rng,5} {ifco timeset}
  65.            {comp rng,q} {ifco quit2}
  66.            {comp rng,RING} {ifco ,host}
  67.  
  68. ********************************************************************************
  69. Answer the phone and process connect.
  70. ********************************************************************************
  71.  
  72. {:rang}    {SEND ^J^M~ATA^J^M~}
  73.            {SETL 45,host}
  74.            {GOLO C300,CONNECT^M}
  75.            {GOLO C120,CONNECT 1200^M}
  76.            {GOLO C240,CONNECT 2400^M}
  77.            {GOLO C480,CONNECT 4800^M}
  78.            {GOLO C960,CONNECT 9600^M}
  79.            {GOLO C192,CONNECT 19200^M}
  80.            {LOOK CONNECT 38400^M}
  81.            {SETV mspeed,38400} {GOTO waitout}
  82. {:C300}    {SETV mspeed,300}  {GOTO waitout}
  83. {:C120}    {SETV mspeed,1200} {GOTO waitout}
  84. {:C240}    {SETV mspeed,2400} {GOTO waitout}
  85. {:C480}    {SETV mspeed,4800} {GOTO waitout}
  86. {:C960}    {SETV mspeed,9600} {GOTO waitout}
  87. {:C192}    {SETV mspeed,19200}
  88. {:waitout} {comp autobaud,n} {ifco WO1} {PARM %mspeed}
  89. {:WO1}     {setv rng} {setv mspeed} {setv tmp} {goto getuser}
  90.  
  91. {:dscroll} {spoc N} {scroll} {goto host2}
  92. {:dolocal} {spoc N} {loca Y} {elap}
  93.            {setv rng} {setv username,SYSOP} {setv ulevel,1} {goto menu2}
  94.  
  95. ********************************************************************************
  96. This routine will be executed if the LIMIT option is selected.
  97. ********************************************************************************
  98.  
  99. {:limit}   {clea} {setv minutes,0} 
  100.            {input minutes,Enter the number of minutes allowed online}
  101.            {goto host2}
  102.  
  103. ********************************************************************************
  104. This routine handles the shutting down of the host mode.
  105. ********************************************************************************
  106.  
  107. {:quit}    {call cls} {send Shutting down the host^M^J} {call pk}
  108. {:quit2}   {ifca ,quitgo} {elap} {hang Y} {paus 2}
  109. {:quitgo}  {spoc y} {loca n} {setv user} {setv dpass} {setv spass}
  110.            {setv minutes} {setv opt} {setv pdir} {setv NOVICE} {setv i_time}
  111.            {setv autobaud} {setv username} {setv ulevel} {setv level}
  112.            {clea} {macl commo.mac} {}
  113. {:sysop}   {setv rng} {spoc N} {goto getuser}
  114. {:timeset} {clea} {setv i_time,0}
  115.            {input i_time,Enter the number of seconds to allow before timeout? }
  116.            {goto host2}
  117.  
  118. ********************************************************************************
  119. The next set of routines handles the logging in of users.
  120. ********************************************************************************
  121.  
  122. {:getuser} {elap} {loca y} {call cls}
  123.            {ifex %_HOM%jbusers,,newuser}
  124.            {send Welcome to the ^(COMMO^) host mode^M^J^M^J}
  125. {:ul}      {setv y,0} {setg %i_time,tout,y,^M^J}
  126. {:t0}      {setv username}
  127.            {send Enter 'NEW' for new user^M^J^M^Jusername: }
  128.            {gets username,20}
  129.            {comp username,new} {ifco newuser}
  130.            {call chk_usr}
  131.            {comp uflag,Y} {ifco gpass}
  132.            {incr Y} {comp-ge y,3} {ifco wuser}
  133.            {send ^M^J^GWrong Entry^M^J} {goto t0}
  134. {:wuser}   {setv username} {setv y}
  135.            {call cls} {call wcerr} {goto host}
  136. {:gpass}   {call entrpas} {comp pflag,Y} {ifco menu,host}
  137.  
  138. ********************************************************************************
  139. This routines accepts a password and verifies it.
  140. ********************************************************************************
  141.  
  142. {:entrpas} {setv pflag,Y} {call cls} {setv y,0}
  143. {:t1}      {send Password: }
  144.            {SETV tmp} {setg %i_time,tout,Y,^M^J}
  145.            {gets-Hp tmp,20}
  146.            {comp tmp,%password} {ifco xentrps}
  147.            {incr Y} {comp Y,3} {ifco wpass}
  148.            {send ^M^JTry again^m^j} {goto t1}
  149. {:wpass}   {call wcerr} {setv pflag,N}
  150. {:xentrps} {setv tmp} {setv y} {retu}
  151.  
  152. ********************************************************************************
  153. This routine handles new users comming into the system.
  154. ********************************************************************************
  155.  
  156. {:newuser} {call cls}
  157.            {send Welcome to the new user ^(COMMO^) Host mode screen^M^J}
  158. {:new1}    {send Please enter your name: }
  159.            {setv username} {setg %i_time,tout,Y,^M^J}
  160.            {gets username,20} {comp username} {ifco new1}
  161. {:new2}    {send ^M^JEnter password: }
  162.            {setv pass} {setg %i_time,tout,Y,^M^J}
  163.            {gets-Hp pass,20}
  164.            {comp pass} {ifco new2}
  165. {:new3}    {send ^M^JVerify Password: }
  166.            {setv pass2}
  167.            {setg %i_time,tout,Y,^M^J}
  168.            {gets-Hp pass2,20}
  169.            {comp pass2} {ifco new3}
  170.            {comp pass,%pass2} {ifco yusr}
  171.            {call wcerr} {goto newuser}
  172. {:yusr}    {call cls}
  173.            {send thank you, writing new user information to disk ...}
  174.            {wope-a1 %_hom%jbusers} {writ %username} {writ %pass}
  175.            {writ %novice} {writ %level}
  176.            {wclo} {setv pass} {setv pass2} {setv uflag,Y} {call pk}
  177.            {setv ulevel,0} {goto menu}
  178.  
  179. ********************************************************************************
  180. The main menu routine.
  181. ********************************************************************************
  182.  
  183. {:menu}    {comp minutes,0} {ifco menu2}
  184.            {comp minutes,%_elap} {ifco-le tout}
  185. {:menu2}   {call cls}
  186.            {send   ^(COMMO^) Host Mode^M^J  Version 5.1^m^j^m^j
  187.            {send   Main Menu^M^J^M^J}
  188.            {send   User: %username    Level: %ULEVEL^M^J^M^J}
  189.            {comp NOVICE,Y} {ifco ,menu3}
  190.            {send   ^(A^) Access DOS Menu^M^J}
  191.            {send   ^(C^) Chat with the Sysop^m^j}
  192.            {send   ^(D^) Download a File^M^J}
  193.            {send   ^(F^) File list of current directory^M^J}
  194.            {send   ^(G^) Good Bye (Logoff)^M^J}
  195.            {send   ^(H^) Help^m^j}
  196.            {comp username,sysop} {ifco mm0}
  197.            {disp ,,,  ^(K^) Kill %username^M^J}
  198.            {disp ,,,  ^(L^) Lower Security for the User^M^J}
  199. {:MM0}     {SEND   ^(O^) time Online^M^J}
  200.            {comp username,sysop} {ifco mmg}
  201.            {disp ,,,  ^(R^) Raise Security for the User^M^J}
  202. {:MMG}     {SEND   ^(s^) Shut Down Host^M^J}
  203.            {send   ^(T^) Timed shutdown (will come back at a specific time)^M^J}
  204.            {SEND   ^(U^) Upload a File^M^J}
  205.            {send   ^(v^) View an Archive^M^J}
  206.            {send   ^(X^) Expert Toggle^m^j^M^J}
  207.            {disp 19,60,,^(!^) Bang to DOS}
  208.            {disp 24,1} {goto menu4}
  209. {:menu3}   {disp ,,,  !} {send ,A,C,D,F,G,H,}
  210.            {comp username,sysop} {ifco mmg1}
  211.            {disp ,,,K,L,}
  212. {:MMG1}    {send O,}
  213.            {comp username,sysop} {ifco mmg2}
  214.            {disp ,,,R,}
  215. {:MMG2}    {send S,T,U,V,X: }
  216. {:menu4}   {call gchoice}
  217.            {comp opt} {ifco menu}
  218.            {comp opt,A} {ifco dosmenu}
  219.            {comp opt,C} {ifco ,mm1}
  220.            {call page} {goto menu}
  221. {:mm1}     {comp opt,D} {ifco dwnload}
  222.            {comp opt,F} {ifco ,dir0}
  223.            {call dir} {goto menu}
  224. {:dir0}    {comp opt,G} {ifco ,mm2}
  225.            {call goodbye} {goto menu}
  226. {:MM2}     {comp opt,H} {ifco help}
  227.            {comp opt,k} {ifco kill}
  228.            {comp opt,l} {ifco lower}
  229.            {comp opt,O} {ifco time}
  230.            {comp opt,r} {ifco raise}
  231.            {comp opt,S} {ifco shut}
  232.            {comp opt,T} {ifco shut}
  233.            {comp opt,U} {ifco upload}
  234.            {comp opt,V} {ifco arcview}
  235.            {comp opt,X} {ifco ,mm3}
  236.            {call expert} {goto menu}
  237. {:MM3}     {comp opt,!} {ifco ,mm4}
  238.            {call bang} {goto menu}
  239. {:MM4}     {goto menu}
  240. {:bang}    {call cls} {send Sysop Shelling to DOS, Stand by...}
  241.            {shell}
  242.            {call cls} {send ^GSysop has returned} {call pk} {retu}
  243.  
  244. ********************************************************************************
  245. This routine handles the expert toggle command.
  246. ********************************************************************************
  247.  
  248. {:expert}  {comp NOVICE,Y} {ifco ,chn}
  249.            {setv NOVICE,N} {retu}
  250. {:chn}     {setv NOVICE,Y} {retu}
  251.  
  252. ********************************************************************************
  253. This routine handles the Good bye command.
  254. ********************************************************************************
  255.  
  256. {:goodbye} {call cls}  {send Are you Sure (Y/N)? }
  257.            {setg %i_time,tout,Y,^M^J} {gets-h opt,1}
  258.            {comp opt} {ifco goodn}
  259.            {comp opt,Y} {ifco ,goodn}
  260. {:goody}   {send ^m^jgood bye.^m^j}
  261. {:goody2}  {ifca ,host} {hang Y} {goto host}
  262. {:goodn}   {retu}
  263. {:help}    {setv file,%_hom%jbhost.hlp} {call dispfil} {setv file} {goto menu}
  264. {:KILL}    {comp username,sysop} {ifco menu} {goto goody2}
  265. {:lower}   {comp username,sysop} {ifco menu}
  266.            {setv ulevel,0} {call cls} {send ^G^GSecurity lowered^M^J}
  267.            {call pk} {goto menu}
  268.  
  269. ********************************************************************************
  270. This routine handles the pageing option.
  271. ********************************************************************************
  272.  
  273. {:page}    {SETG i_time,tout} {beep} {beep} {beep} {beep} {beep}
  274.            {call cls}
  275.            {SEND Type '/EXIT' to exit chat mode^M^J^M^J}
  276. {:p1}      {SETV line}
  277. {:p2}      {GETS-AH line,70}
  278.            {COMP line,/exit} {IFCO p5}
  279.            {LENG %line} {COMP %_len,65} {IFCO-LE p1} {SETV x,70}
  280. {:p3}      {DECR x} {COMP x,50} {IFCO-LE p1}
  281.            {SUBS ch,%x,1,%line} {COMP ch, } {IFCO ,p3} {INCR x}
  282.            {SUBS line,%x,255,%line}
  283. {:p4}      {COMP x,%_len} {IFCO-G p2} {INCR x} {GOTO p4}
  284. {:p5}      {call pk} {setv line} {RETU}
  285.  
  286. ********************************************************************************
  287. Show current date/time.
  288. ********************************************************************************
  289.  
  290. {:raise}   {comp username,sysop} {ifco menu}
  291.            {setv ulevel,1} {call cls} {send ^G^GSecurity raised^M^J}
  292.            {call pk} {goto menu}
  293. {:time}    {call cls}
  294.            {send Current date: %_DWT %_dat %_12H:%_min:%_SEC %_AMP^M^J^M^J}
  295.            {send You have been online for %_elap minutes^M^J}
  296.            {comp minutes,0} {ifco timeend}
  297.            {setv tmp,%minutes} {decr tmp,%_elap}
  298.            {send ^M^JTime remaining online is %tmp% minutes^M^J} {setv tmp}
  299. {:timeend} {call pk} {goto menu}
  300.  
  301. ********************************************************************************
  302. This set of routines handles the archive viewing command.
  303. ********************************************************************************
  304.  
  305. {:arcview} {call fname} {comp file} {ifco menu}
  306.            {send ^m^jpreparing the listing.^m^j}
  307.            {exec rv %file%>arclist.$$$}
  308.            {setv file,arclist.$$$}
  309.            {call dispfil} {exec del arclist.$$$}
  310.            {setv alister} {setv file} {goto menu}
  311.  
  312. ********************************************************************************
  313. This routine set handles the dos menu.
  314. ********************************************************************************
  315.  
  316. {:dosmenu} {setv password,%dpass}
  317.            {call entrpas} {comp pflag,Y} {ifco ,menu}
  318. {:dosmnu2} {call cls}
  319.            {send   DOS Menu^M^J^M^J}
  320.            {comp NOVICE,Y} {ifco ,expdos}
  321.            {send   ^(C^) Change to a new Directory^M^J}
  322.            {send   ^(D^) Change to a different drive^M^J}
  323.            {send   ^(f^) File List of current directory^M^J}
  324.            {send   ^(G^) Good bye (logoff)^M^J}
  325.            {send   ^(P^) Page the Sysop for a Chat^M^J}
  326.            {send   ^(s^) Shell to DOS^M^J}
  327.            {send   ^(t^) Type a File^M^J}
  328.            {send   ^(X^) Expert Toggle^M^J}
  329.            {send   ^(-^) Previous Menu^M^J^m^j}
  330.            {goto getdos}
  331. {:expdos}  {send   C,D,F,G,P,S,T,V,X,-: }
  332. {:getdos}  {call gchoice}
  333.            {comp opt} {ifco dosmnu2}
  334.            {comp opt,c} {ifco chdir}
  335.            {comp opt,d} {ifco chdrv}
  336.            {comp opt,f} {ifco ,DIR1}
  337.            {call dir} {goto dosmnu2}
  338. {:dir1}    {comp opt,g} {ifco ,dm0}
  339.            {call goodbye} {goto dosmnu2}
  340. {:dm0}     {comp opt,p} {ifco ,dmp1}
  341.            {call page} {goto dosmnu2}
  342. {:dmp1}    {comp opt,S} {ifco shell}
  343.            {comp opt,T} {ifco type}
  344.            {comp opt,x} {ifco ,dm1}
  345.            {call expert} {goto dosmnu2}
  346. {:DM1}     {comp OPT,-} {ifco MENU}
  347.            {comp opt,!} {ifco ,dm2}
  348.            {call bang} {goto dosmnu2}
  349. {:dm2}     {goto DOSmnu2}
  350.  
  351. ********************************************************************************
  352. This is the change directory command.
  353. ********************************************************************************
  354.  
  355. {:chdir}   {call cls}
  356.            {setv tmp} {send Directory Name: }
  357.            {gets tmp,12}
  358.            {comp tmp} {ifco dosmnu2}
  359.            {exec cd %tmp}
  360.            {send ^m^jcurrent Directory is now %tmp^m^j}
  361.            {setv tmp} {call pk} {goto dosmnu2}
  362.  
  363. ********************************************************************************
  364. This is the change drive command.
  365. ********************************************************************************
  366.  
  367. {:chdrv}   {call cls} {setv tmp}
  368.            {send Drive: } {gets tmp,2}
  369.            {comp tmp} {ifco dosmnu2}
  370.            {exec %tmp}
  371.            {send ^m^jcurrent Drive is now %tmp%^m^j}
  372.            {setv tmp} {call pk} {goto dosmnu2}
  373.  
  374. ********************************************************************************
  375. This is the directory command routine.
  376. ********************************************************************************
  377.  
  378. {:dir}     {exec dir>%_hom%dir$$$}
  379.            {setv file,%_hom%dir$$$} {call dispfil}
  380.            {exec del %_hom%dir$$$}
  381.            {setv file} {retu}
  382.  
  383. ********************************************************************************
  384. This routine handles the shell to DOS.
  385. ********************************************************************************
  386.  
  387. {:shell}   {call cls} {comp ulevel,0} {ifco nolevel}
  388.            {send ^M^Jshelling to DOS^M^J} {ifca ,shell2}
  389.            {send Type 'EXIT' to return to host}
  390.            {exec DOORWAY com%_por% /M:60 /S:* /K:0 /G:ON /A:ON /V:D^U /b:Z /C:DOS}
  391.            {goto shell3}
  392. {:shell2}  {shell}
  393. {:shell3}  {setv y} {setv tmp} {call pk} {goto dosmnu2}
  394. {:type}    {call fname} {comp file} {ifco dosmnu2} {call dispfil} {goto dosmnu2}
  395.  
  396. ********************************************************************************
  397. This handles either the timed or regular shutdown routine.
  398. ********************************************************************************
  399.  
  400. {:shut}    {comp ulevel,0} {ifco nolevel2}
  401.            {setv password,%spass}
  402.            {call entrpas} {comp pflag,Y} {ifco ,menu}
  403.            {comp opt,T} {ifco event} {comp opt,s} {ifco quit}
  404.  
  405. ********************************************************************************
  406. This routine handles the Timed shutdown command.
  407. ********************************************************************************
  408.  
  409. {:event}   {call cls}
  410.            {send Enter the time in 24-hour format that the^M^J}
  411.            {send host should be back online: }
  412.            {setv tmp}
  413.            {setg %i_time,tout,L,^M^J}
  414.            {gets tmp,20} {comp tmp} {ifco endev}
  415.            {send ^M^JThe host will be down until %tmp^M^J}
  416.            {call pk} {ifca ,noev}
  417.            {hang y} {paus 2}
  418. {:noev}    {spoc N} {clea} {hold %tmp} {goto host}
  419. {:endev}   {setv Y} {goto menu}
  420.  
  421. ********************************************************************************
  422. This routine checks for users in the jbusers file.
  423. ********************************************************************************
  424.  
  425. {:chk_usr} {ifex %_hom%jbusers,ugo_on,chk_end}
  426. {:ugo_on}  {setv uflag} {rope %_hom%jbusers,chk_end}
  427. {:chkread} {read line}
  428.            {comp line,%username} {ifco ,notusr}
  429. {:riteusr} {read password} {read novice} {read ulevel}
  430.            {setv uflag,Y} {rclo} {retu}
  431. {:notusr}  {read line} {read line} {read line} {setv line} {goto chkread}
  432. {:chk_end} {setv uflag,N} {setv line} {retu}
  433. {:cls}     {SEND ^[[2J^[[1;1H} {retu}
  434.  
  435. ********************************************************************************
  436. This routine will display a given file.
  437. ********************************************************************************
  438.  
  439. {:dispfil} {setv x,0} {call cls}
  440.            {rope %file,rd_end}
  441. {:disr}    {setv line} {read line}
  442.            {send %line%^M^J} {incr x}
  443.            {comp x,21} {ifco np} {goto disr}
  444. {:np}      {SEND ^M^JPress ^(S^) to stop, any other key to continue ...}
  445.            {setg %i_time,tout} {gets-H tmp,1}
  446.            {comp tmp,s} {ifco ,NP1}
  447.            {setv x} {setv line} {rclo} {call cls} {retu}
  448. {:NP1}     {send ^M^J} {setv x,0} {goto disr}
  449. {:rd_end}  {setv line} {setv x} {call pk} {call cls} {retu}
  450.  
  451. ********************************************************************************
  452. This routine will give an error message if the user is at level 0.
  453. ********************************************************************************
  454.  
  455. {:nolevel} {call sysmsg} {goto dosmnu2}
  456. {:nolevel2}{call sysmsg} {goto menu2}
  457. {:sysmsg}  {call cls}
  458.            {send Sorry, you are not a level 1 user.^M^J}
  459.            {send You can not perform this action at this level.^M^J}
  460.            {send Contact the sysop for an increase in security.^M^J}
  461.            {call pk} {retu}
  462.  
  463. ********************************************************************************
  464. This routine handles the download menu.
  465. ********************************************************************************
  466.  
  467. {:dwnload} {call fname} {comp file} {ifco menu}
  468. {:dwnld2}  {call cls}
  469.            {send   Download menu^M^J^M^J}
  470.            {comp novice,n} {ifco dwnexp}
  471.            {send   ^(A^) Ascii^M^J}
  472.            {send   ^(C^) Chat with the Sysop^M^J}
  473.            {send   ^(E^) Expert Mode Toggle^M^J}
  474.            {send   ^(G^) Good Bye (logoff)^M^J}
  475.            {send   ^(H^) HS/LINK^M^J}
  476.            {send   ^(X^) Xmodem^M^J}
  477.            {send   ^(Y^) Ymodem^M^J}
  478.            {send   ^(Z^) Zmodem^M^J}
  479.            {send   ^(-^) Previous menu^M^J^M^J}
  480.            {goto dwnopt}
  481. {:dwnexp}  {send   A,C,E,G,H,X,Y,Z,-: }
  482. {:dwnopt}  {call gchoice}
  483.            {comp opt,-} {ifco menu2}
  484.            {comp opt,A} {ifco dla}
  485.            {comp opt,c} {ifco ,dwn1}
  486.            {call page} {goto dwnld2}
  487. {:DWN1}    {comp opt,e} {ifco ,dwex1}
  488.            {call expert} {goto dwnld2}
  489. {:dwex1}   {comp opt,g} {ifco ,dwn2}
  490.            {call goodbye} {goto dwnld2}
  491. {:DWN2}    {comp opt,h} {ifco dlh}
  492.            {comp opt,X} {ifco dlx}
  493.            {comp opt,Y} {ifco dly}
  494.            {comp opt,Z} {ifco dlz}
  495.            {comp opt,!} {ifco ,dwn3}
  496.            {call bang} {goto dwnld2}
  497. {:DWN3}    {goto dwnld2}
  498.  
  499. ********************************************************************************
  500. The following routines will transfer files using different protocols.
  501. These are used for the download menu.
  502. ********************************************************************************
  503.  
  504. {:dla}     {call tdl} {asci-s0 %file}
  505.            {setv file} {call pk} {goto dwnload}
  506. {:dlh}     {call tdl}
  507.            {exec-d %pdir%hslink.exe -p%_port %file}
  508.            {ifer 1,dlh0,dlh1}
  509. {:dlh0}    {call terr} {goto dwnload}
  510. {:dlh1}    {setv opt} {setv file} {call pk} {goto dwnload}
  511. {:dlx}     {call tdl}
  512.            {sxmo %file} {ifer 1,dlx0,dlx1}
  513. {:dlx0}    {call terr} {goto dwnload}
  514. {:DLX1}    {setv file} {call pk}
  515.            {goto dwnload}
  516. {:DLY}     {setv opt, port %_port sb} {goto dlt}
  517. {:DLZ}     {setv opt, port %_port sz -mrr} {goto dlt}
  518. {:dlt}     {call tdl}
  519.            {exec-d %pdir%%dszprog% %opt %file} {ifer 1,dlt0,dlt1}
  520. {:DLT0}    {call terr} {goto dwnload}
  521. {:dlt1}    {setv opt} {setv file} {call pk} {goto dwnload}
  522. {:tdl}     {send ^m^jsending file now...^m^j} {retu}
  523.  
  524. ********************************************************************************
  525. This routine will get a valid filename from the user.
  526. ********************************************************************************
  527.  
  528. {:fname}   {call cls} {setv file} {setv fnflag}
  529.            {send ^M^jFilename: } {gets file,40}
  530.            {comp file} {ifco yfile}
  531.            {ifex %file,yfile}
  532. {:nfile}   {send ^m^jFile not found!.^m^j} {call pk} {setv file}
  533. {:yfile}   {retu}
  534.  
  535. ********************************************************************************
  536. This routine gets the option for the menu currently in.
  537. ********************************************************************************
  538.  
  539. {:gchoice} {comp novice,N} {ifco g_choi2} {send   Your Choice? }
  540. {:g_choi2} {setv opt} {setg %i_time,tout,y,^m^j} {gets-h opt,1} {retu}
  541.  
  542. ********************************************************************************
  543. This routine will ask for a key and will then pause.
  544. ********************************************************************************
  545.  
  546. {:pk}      {SEND ^M^JPress Any Key to continue: }
  547.            {setg %i_time,tout,Y,^M^J} {gets-H tmp,1} {setv tmp} {retu}
  548. {:terr}    {call cls} {send ^Gerror during transfer^M^J} {call pk} {retu}
  549. {:tout}    {send ^G^G^m^jTimed out.^m^j} {call pk} {hang y} {paus 2} {goto host}
  550.  
  551. ********************************************************************************
  552. This routine handles the upload menu.
  553. ********************************************************************************
  554.  
  555. {:upload}  {setv opt} {call cls}
  556.            {send   Upload Menu^M^J^M^J}
  557.            {comp novice,n} {ifco upexp}
  558.            {send   ^(C^) Chat with the Sysop^M^J}
  559.            {send   ^(E^) Expert Mode Toggle^M^J}
  560.            {send   ^(G^) Good Bye (logoff)^M^J}
  561.            {send   ^(H^) HS/LINK^M^J}
  562.            {send   ^(X^) Xmodem^M^J}
  563.            {send   ^(Y^) Ymodem^M^J}
  564.            {send   ^(Z^) Zmodem^M^J}
  565.            {send   ^(-^) Previous Menu^M^J^M^J}
  566.            {goto upopt}
  567. {:upexp}   {send   C,E,G,H,X,Y,Z,-: }
  568. {:upopt}   {call gchoice}
  569.            {comp opt} {ifco menu2}
  570.            {comp opt,-} {ifco menu2}
  571.            {comp opt,c} {ifco ,upl1}
  572.            {call page} {goto upload}
  573. {:UPL1}    {comp opt,e} {ifco ,upex1}
  574.            {call expert} {goto upload}
  575. {:upex1}   {comp opt,g} {ifco ,upl2}
  576.            {call goodbye} {goto upload}
  577. {:UPL2}    {comp opt,h} {ifco ulh}
  578.            {comp opt,X} {ifco ulx}
  579.            {comp opt,Y} {ifco uly}
  580.            {comp opt,Z} {ifco ulz}
  581.            {comp opt,!} {ifco ,upl3}
  582.            {call bang} {goto upload}
  583. {:UPL3}    {goto upload}
  584.  
  585. ********************************************************************************
  586. The following routines are used for transfering files with different
  587. protocols.
  588. ********************************************************************************
  589.  
  590. {:ulh}     {call tup}
  591.            {exec-d %pdir%HSLINK.exe -p%_port -u%dldir} {ifer 1,ulh0,ulh1}
  592. {:ULH0}    {call terr} {goto upload}
  593. {:ulh1}    {setv opt} {call pk} {goto menu}
  594. {:ulx}     {call cls} {send Name of file to upload: }
  595.            {gets file,40} {comp file} {ifco upload}
  596.            {call tup} {rxmo %file} {ifer 1,ulx0,ulx1}
  597. {:ULX0}    {call terr} {goto upload}
  598. {:ulx1}    {setv file} {call pk} {goto menu}
  599. {:uly}     {setv opt, port %_port rb} {goto ult}
  600. {:ulz}     {setv opt, port %_port rz -m} {goto ult}
  601.  
  602. ********************************************************************************
  603. This routine handles the uploading protocol transfers.
  604. ********************************************************************************
  605.  
  606. {:ult}     {call tup} {exec-d %pdir%%dszprog% %opt} {ifer 1,ult0,ult1}
  607. {:ULT0}    {call terr} {goto upload}
  608. {:ult1}    {setv opt} {call pk} {goto upload}
  609. {:tup}     {send ^m^jReceiving file now...^m^j} {retu}
  610. {:wcerr}   {setv opt} {send ^M^J^GWrong Entry} {call pk} {retu}
  611.