home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / W / WWIVSOR.ZIP / MMENU.C < prev    next >
Text File  |  1995-05-27  |  35KB  |  1,392 lines

  1. /*****************************************************************************
  2.  
  3.                 WWIV Version 4
  4.                     Copyright (C) 1988-1995 by Wayne Bell
  5.  
  6. Distribution of the source code for WWIV, in any form, modified or unmodified,
  7. without PRIOR, WRITTEN APPROVAL by the author, is expressly prohibited.
  8. Distribution of compiled versions of WWIV is limited to copies compiled BY
  9. THE AUTHOR.  Distribution of any copies of WWIV not compiled by the author
  10. is expressly prohibited.
  11.  
  12.  
  13. *****************************************************************************/
  14.  
  15.  
  16.  
  17. #include "vars.h"
  18.  
  19. #pragma hdrstop
  20.  
  21. #include "ripint.h"
  22. #include <ctype.h>
  23.  
  24.  
  25.  
  26. void mainmenu(void)
  27. {
  28.   char *s, s1[81], s2[81], ch;
  29.   int i, useconf, ac,pos;
  30.   static int mflag = 0, no_clear = 0;
  31.   long oldstat;
  32.   FILE *namefile;
  33.  
  34.   s2[0]=0;
  35.   if (usub[cursub].subnum==-1) {
  36.     cursub=0;
  37.     if (usub[cursub].subnum==-1) {
  38.       strcpy(s2,get_string(16));
  39.     }
  40.   }
  41.  
  42.   write_inst(INST_LOC_MAIN,usub[cursub].subnum,INST_FLAGS_NONE);
  43.  
  44.   tleft(1);
  45.   if ((sysstatus_expert & thisuser.sysstatus)==0) {
  46.     if (menu_on() && no_clear == 0 && cleared != HYPCLEAR) {
  47.  
  48.       if (cleared == NEEDCLEAR)
  49.         rip_cls();
  50.  
  51.       if (autox)
  52.         rmenu = 300;
  53.  
  54.       if (rmenu > 0) {
  55.         nln(4);
  56.         /* Compensate for menu scrolling; varies on some systems */
  57.         sprintf(s1,"\x1b[%dA\r", 8 + sysinfo.rip_rm_adjust);
  58.         outstr(s1);
  59. #ifdef RIPDRIVE
  60.         if (rd_on()) {     /* For RIPdrive local */
  61.           if (sysinfo.rip_rm_adjust > 1)
  62.             sprintf(s1,"\x1b[%dB\r", sysinfo.rip_rm_adjust-2);
  63.           else if (sysinfo.rip_rm_adjust < 1)
  64.             sprintf(s1,"\x1b[%dA\r", 2-sysinfo.rip_rm_adjust);
  65.           rd_str(s1);
  66.         }
  67. #endif
  68.       }
  69.       printmenu(rmenu);
  70.       topscreen();
  71.       if (cleared == NEEDCLEAR || cleared == WASCLEARED) {
  72.         cleared = 0;
  73.         outstr("\x1b[20H");        /* Line 20 at start */
  74.       } else if (rmenu > 0)
  75.         mflag = -1;
  76.  
  77.       if (rip_on() && autox && (!rip_subset)) {
  78.         sprintf(s1, "%sAUTOEXEC.RIP", sysinfo.ripdir);   /* Check for AUTOEXEC.RIP */
  79.         if (exist(s1))                           /* locally */
  80.           rip_show(s1);
  81.         comstr("|1F000000AUTOEXEC.RIP|#\r ");   /* and on user's machine */
  82.         if (delaykey(1) == '1')
  83.           comstr("|1R00000000AUTOEXEC.RIP\r "); /* and play if exists */
  84.       }
  85.       autox = 0;
  86.       rmenu = 0;
  87.     } else
  88.       printmenu(0);
  89.   }
  90.  
  91.   nln(2);
  92.   tleft(1);
  93.  
  94.   useconf=((uconfsub[1].confnum!=-1) && okconf(&thisuser));
  95.  
  96.   if (E_C) {
  97.     npr("1T 0- 1%s\r\n",ctim(nsl()));
  98.     sprintf(s1,"7[1%s %c7] [1%s7]", get_string(1627),
  99.             subconfs[uconfsub[curconfsub].confnum].designator,
  100.       stripcolors(subconfs[uconfsub[curconfsub].confnum].name));
  101.     if (s2[0]==0)
  102.       sprintf(s2,"7[1%s%s7] [1%s7]0 : 2",
  103.         useconf?get_string(1398):"",
  104.         usub[cursub].keys,
  105.         stripcolors(subboards[usub[cursub].subnum].name));
  106.   } else {
  107.     npr("T - %s\r\n",ctim(nsl()));
  108.     sprintf(s1,"[%s %c] [%s]", get_string(1627),
  109.       subconfs[uconfsub[curconfsub].confnum].designator,
  110.       stripcolors(subconfs[uconfsub[curconfsub].confnum].name));
  111.     if (s2[0]==0)
  112.       sprintf(s2,"[%s%s] [%s] :",
  113.         useconf?get_string(1398):"",
  114.         usub[cursub].keys,
  115.         stripcolors(subboards[usub[cursub].subnum].name));
  116.   }
  117.  
  118.   if (useconf) {
  119.     ansic(2);
  120.     pl(s1);
  121.   }
  122. #ifdef RIPDRIVE
  123.   if (rd_on())
  124.     rd_str("\x1b[0J");       /* Clear to EOS */
  125. #endif
  126.   if (menu_on())
  127.     outstr("\x1b[0J");
  128.   prt(2,s2);
  129.   helpl=1;
  130.   s=mmkey(0);
  131.   helpl=0;
  132.   if (s[0])
  133.     for (i=0; (i<num_subs) && (usub[i].subnum!=-1); i++)
  134.       if (strcmp(usub[i].keys,s)==0)
  135.         cursub=i;
  136.   if (strlen(s)>2) {
  137.     sprintf(s1,"//%s",s);
  138.     sysopchar(s1);
  139.   } else
  140.     sysopchar(s);
  141.  
  142.   no_clear = 0;
  143.   if (menu_on() && cleared != HYPCLEAR) {
  144.     comstr("!|1K\r ");     /* Disable menus */
  145.     if (mflag) {
  146.       rip_pcb();
  147.       mflag = 0;
  148.     }
  149.     if (rip_pause)
  150.       printmenu(334);
  151.     if ( (strcmp(s,"/C") == 0) || (s[1] == 0 && (strchr("PEFJ", s[0])
  152.      != NULL)) ) {
  153.       printmenu(321);
  154.       cleared = WASCLEARED;
  155.     } else if (isalpha(s[0]) || (strchr("$", s[0]) != NULL && s[1] == 0))
  156.       printmenu(320);       /* Draw w/Quit & Help unless menu pulled down */
  157.     else if (s[0] != '/' && s[0] != '.')
  158.       no_clear = -1;
  159.     if ((strchr("EFGMNPQS",s[0]) != NULL) || (strcmp(s,"/A") == 0) ||
  160.       strcmp(s,"/E") == 0) {
  161.       rmenu = 300;
  162.       cleared = NEEDCLEAR;
  163.     }
  164.   }
  165.  
  166. /**************************************************/
  167.  
  168.   if (so()) {
  169.     if ((strcmp(s,"ALLOWEDIT")==0) || (strcmp(s,"AE")==0))
  170.       edit_database();
  171.     if ((strcmp(s,"READINI")==0) || (strcmp(s,"RI")==0)) {
  172.       if (!read_ini_info()) {
  173.         printf(get_string(1504));
  174.         end_bbs(noklevel);
  175.       }
  176.       if (!chains_reg)
  177.         sysinfo.flags &= ~OP_FLAGS_CHAIN_REG;
  178.       topscreen();
  179.     }
  180.     if ((strcmp(s,"INSTEDIT")==0) || (strcmp(s,"IE")==0))
  181.       instance_edit();
  182.     if ((strcmp(s,"CONFEDIT")==0) || (strcmp(s,"JE")==0)) {
  183.       write_inst(INST_LOC_CONFEDIT,0,INST_FLAGS_NONE);
  184.       edit_confs();
  185.     }
  186.     if ((strcmp(s,"BOARDEDIT")==0) || (strcmp(s,"BE")==0)) {
  187.       write_inst(INST_LOC_BOARDEDIT,0,INST_FLAGS_NONE);
  188.       sysoplog(get_stringx(1,2));
  189.       boardedit();
  190.     }
  191.     if ((strcmp(s,"CHAINEDIT")==0) || (strcmp(s,"CE")==0)) {
  192.       write_inst(INST_LOC_CHAINEDIT,0,INST_FLAGS_NONE);
  193.       sysoplog(get_stringx(1,4));
  194.       chainedit();
  195.     }
  196.     if (strcmp(s, "CHAT")==0) {
  197.       nl();
  198.       pl(((*(char far *)0x00000417L ^= 0x10) & 0x10) ?
  199.                        get_string(21) :
  200.                        get_string(22));
  201.       sysoplog(get_stringx(1,9));
  202.       topscreen();
  203.     }
  204.     if ((strcmp(s,"CHUSER")==0) || (strcmp(s,"CU")==0)) {
  205.       write_inst(INST_LOC_CHUSER,0,INST_FLAGS_NONE);
  206.       chuser();
  207.     }
  208.     if (strcmp(s,"CLOUT")==0) {
  209.       npr("\r\nNot Yet.\r\n");
  210.     /*  force_callout(2); */
  211.     }
  212.     if (strncmp(s,"DEBUG",5)==0) {
  213.       if((s[5]) && (s[5]!=' '))
  214.         debuglevel=s[5]-'0';
  215.       else if(s[6])
  216.         debuglevel=s[6]-'0';
  217.     }
  218.     if ((strcmp(s,"DIREDIT")==0) || (strcmp(s,"DE")==0)) {
  219.       write_inst(INST_LOC_DIREDIT,0,INST_FLAGS_NONE);
  220.       sysoplog(get_stringx(1,3));
  221.       dlboardedit();
  222.     }
  223.     if (strcmp(s,"DOS")==0) {
  224.       if (checkpw()) {
  225.         write_inst(INST_LOC_DOS,0,INST_FLAGS_NONE);
  226.         sysoplog(get_stringx(1,6));
  227.         extern_prog(getenv("COMSPEC"), EFLAG_SHRINK|EFLAG_COMIO|EFLAG_ABORT);
  228.       }
  229.     }
  230.     if ((strcmp(s,"EDIT")==0)) {
  231.       if (checkpw()) {
  232.         write_inst(INST_LOC_TEDIT,0,INST_FLAGS_NONE);
  233.         nl();
  234.         prt(2,get_string(7));
  235.         input(s1,50);
  236.         if (s1[0]) {
  237.           if ((okansi()) && (thisuser.defed))
  238.             external_edit(s1,"",thisuser.defed-1,500,".",s1,1);
  239.           else
  240.             tedit(s1);
  241.         }
  242.       }
  243.     }
  244.     if ((strcmp(s,"GFILEEDIT")==0) || (strcmp(s,"GE")==0)) {
  245.       write_inst(INST_LOC_GFILEEDIT,0,INST_FLAGS_NONE);
  246.       sysoplog(get_stringx(1,5));
  247.       gfileedit();
  248.     }
  249.     if (strcmp(s,"LOAD")==0) {
  250.       nl();
  251.       prt(2,get_string(7));
  252.       input(s1,50);
  253.       if (s1[0]) {
  254.         nl();
  255.         prt(5,get_string(17));
  256.         if (yn()) {
  257.           nl();
  258.           load_workspace(s1,0);
  259.         } else {
  260.           nl();
  261.           load_workspace(s1,1);
  262.         }
  263.       }
  264.     }
  265.     if (strcmp(s,"MAILR")==0) {
  266.       if (checkpw()) {
  267.         write_inst(INST_LOC_MAILR,0,INST_FLAGS_NONE);
  268.         sysoplog(get_stringx(1,8));
  269.         mailr();
  270.       }
  271.     }
  272.     if ((strcmp(s,"REBOOT")==0) && (checkpw())) {
  273.       write_inst(INST_LOC_REBOOT,0,INST_FLAGS_NONE);
  274.       dtr(0);
  275.       sysoplog(get_stringx(1,7));
  276.       logoff();
  277.       sl1(1,"");
  278.       if (ok_modem_stuff)
  279.         closeport();
  280.       close_strfiles();
  281.       Wait(3.0);
  282. #ifdef __OS2__
  283.       sprintf(s2, "/IBD:%c", syscfg.ramdrive);
  284.       execlp("setboot.exe", "setboot.exe", s2, NULL);
  285. #else
  286.       setvect(0xff,(void interrupt (*) ()) MK_FP(0xffff,0x0000));
  287.       geninterrupt(0xff);
  288. #endif
  289.     }
  290.     if (strcmp(s,"RELOAD")==0) {
  291.       write_inst(INST_LOC_RELOAD,0,INST_FLAGS_NONE);
  292.       read_new_stuff();
  293.     }
  294.     if (strcmp(s,"RESETF")==0) {
  295.       write_inst(INST_LOC_RESETF,0,INST_FLAGS_NONE);
  296.       reset_files();
  297.     }
  298.     if (strcmp(s, "RESETQSCAN")==0) {
  299.       prt(5,get_string(970));
  300.       if (yn()) {
  301.         write_inst(INST_LOC_RESETQSCAN,0,INST_FLAGS_NONE);
  302.         for (i=0; i<=number_userrecs(); i++) {
  303.           read_qscn(i, qsc, 1);
  304.           memset(qsc_p,
  305.                  0,
  306.                  syscfg.qscn_len - 4*(1+((max_dirs+31)/32)+((max_subs+31)/32)));
  307.           write_qscn(i, qsc, 1);
  308.         }
  309.         read_qscn(1, qsc, 0);
  310.         close_qscn();
  311.       }
  312.     }
  313.     if (strcmp(s,"STAT")==0) {
  314.       read_status();
  315.       nl();
  316. #ifndef __OS2__
  317.       outstr(get_string(18));
  318.       pln(_stklen);
  319. #endif
  320.       outstr(get_string(19));
  321.       npr("%dk\r\n", (int) (bbscoreleft()/1024));
  322.       outstr(get_string(20));
  323.       npr("%d%%\r\n", cachestat());
  324.       outstr(get_string(938));
  325.       npr("%lu\r\n",status.qscanptr);
  326.       nl();
  327.     }
  328.     if (strcmp(s,"PACK")==0) {
  329.       nl();
  330.       prt(5, get_string(1505));
  331.       if (yn())
  332.         pack_all_subs();
  333.       else
  334.         pack_sub(usub[cursub].subnum);
  335.     }
  336.   }
  337. /**************************************************/
  338.  
  339.   if (cs()) {
  340.     if (strcmp(s,"IVOTES")==0) {
  341.       write_inst(INST_LOC_VOTE,0,INST_FLAGS_NONE);
  342.       sysoplog(get_stringx(1,11));
  343.       ivotes();
  344.     }
  345.     if (strcmp(s,"LOG")==0) {
  346.       slname(date(), s1);
  347.       print_local_file(s1,"");
  348.     }
  349.     if (strcmp(s,"NLOG")==0) {
  350.       print_local_file("NET.LOG","");
  351.     }
  352.     if (strcmp(s,"PENDING")==0) {
  353.       print_pending_list();
  354.     }
  355.     if (strcmp(s,"STATUS")==0) {
  356.       prstatus();
  357.     }
  358.     if (strcmp(s,"TEDIT")==0) {
  359.       write_inst(INST_LOC_TEDIT,0,INST_FLAGS_NONE);
  360.       sysoplog(get_stringx(1,12));
  361.       text_edit();
  362.     }
  363.     if ((strcmp(s,"UEDIT")==0) || (strcmp(s,"UE")==0)) {
  364.       write_inst(INST_LOC_UEDIT,0,INST_FLAGS_NONE);
  365.       sysoplog(get_stringx(1,10));
  366.       uedit(usernum,0);
  367.     }
  368.     if (strcmp(s,"VOTEPRINT")==0) {
  369.       write_inst(INST_LOC_VOTEPRINT,0,INST_FLAGS_NONE);
  370.       voteprint();
  371.     }
  372.     if (strcmp(s,"YLOG")==0) {
  373.       read_status();
  374.       print_local_file(status.log1,"");
  375.     }
  376.     if (strcmp(s,"ZLOG")==0) {
  377.       zlog();
  378.     }
  379.     if ((strcmp(s,",")==0) && ((net_sysnum>0) || (net_num_max>1))) {
  380.       nl();
  381.       prt(2,get_string(23));
  382.       ch=onek("Q012");
  383.       switch(ch) {
  384.         case '0': print_local_file(get_string(1027),""); break;
  385.         case '1': print_local_file(get_string(1028),""); break;
  386.         case '2': print_local_file(get_string(1029),""); break;
  387.       }
  388.     }
  389.     if (strcmp(s,"/?")==0) {
  390.       printmenu(5);
  391.     }
  392.   }
  393.  
  394. /*************************************************/
  395.  
  396.   if ((strcmp(s,"UPLOAD")==0) && (actsl>10))
  397.     upload_post();
  398.   if (strcmp(s,"QWK")==0)
  399.     qwk_menu();
  400.   if (strcmp(s,"CLS")==0) {
  401.     outstr("\f");
  402.     if (rip_on()) {
  403.       //comstr("\r!|*\r");
  404.       rmenu = 300;
  405.       cleared = NEEDCLEAR;
  406.     }
  407.   }
  408.   if ((strcmp(s,"NET")==0) || (strncmp(s,"NET=",4)==0))
  409.     print_net_listing(0);
  410.   if (strcmp(s,"QSCAN")==0) {
  411.     nl();
  412.     prt(5,get_string(24));
  413.     if (yn()) {
  414.       read_status();
  415.       for (i=0; i<max_subs; i++)
  416.         qsc_p[i]=status.qscanptr-1L;
  417.       nl();
  418.       pl(get_string(25));
  419.       nl();
  420.     }
  421.   }
  422.   if (strcmp(s,"VER")==0) {
  423.     if (menu_on()) {
  424.       printmenu(322);
  425.       getkey();
  426.       cleared = NEEDCLEAR;
  427.       rip_cls();
  428.     }
  429.     nl();
  430.     npr("%s   (%s)\r\n",wwiv_version, wwiv_date);
  431.     nln(3);
  432.     pl("The author may be contacted at:");
  433.     nl();
  434.     pl("   Wayne Bell");
  435.     pl("   WWIV Software Services");
  436.     pl("   PO Box 720455");
  437.     pl("   McAllen, TX  78504-0455");
  438.     nl();
  439.     if (menu_on())
  440.       pausescr();
  441.   }
  442.   if (strcmp(s,"WHO")==0) {
  443.     multi_instance();
  444.   }
  445.   if (strlen(s) == 2 && s[0] == '/' && s[1] >= '0' && s[1] <= MAXMENU)
  446.     rmenu = 301 + s[1] - '0';
  447.  
  448.   if (strcmp(s,"/A")==0) {
  449.     write_inst(INST_LOC_SUBS,usub[cursub].subnum,INST_FLAGS_NONE);
  450.     express=0;
  451.     expressabort=0;
  452.     if ((uconfsub[1].confnum!=-1) && (okconf(&thisuser))) {
  453.       ac=1;
  454.       tmp_disable_conf(1);
  455.     }
  456.     nscan(0);
  457.     if (ac)
  458.       tmp_disable_conf(0);
  459.   }
  460.   if (strcmp(s,"/E")==0)
  461.     slash_e();
  462.   if (strcmp(s,"/N")==0)
  463.     nscan(cursub);
  464.   if (strcmp(s,"/O")==0) {
  465.     if (numbatchdl!=0) {
  466.       nl();
  467.       outstr(get_string(1324));
  468.       if (ny())
  469.         batchdl(1);
  470.       else
  471.         hangup=1;
  472.     } else
  473.       hangup=1;
  474.   }
  475.   if (strcmp(s,"/R")==0) {
  476.     if (using_modem) {
  477.       rip = rip_check();
  478.       if (rip_on()) {
  479.         if (rip_ver == 15450) {
  480.           rip_subset = -1;
  481.           pl(get_string(1441));        //ripstring(7));
  482.           pausescr();
  483.         } else {
  484.           cleared = WASCLEARED;
  485.           rmenu = 300;
  486.           choosemenu();
  487.         }
  488.       }
  489.     } else {
  490.       if (localrip_detect()) {          // RIPdrive is available
  491.         if (((sysinfo.flags & OP_FLAGS_RIPDRIVE_ON) != 0)
  492.             && !(thisuser.sysstatus & sysstatus_disable_rip)) {
  493.           if (rip_on()==0)
  494.             localrip_activate(sysinfo.ripdir, sysinfo.ripdir);
  495.           strcpy(sysinfo.ripdir,languagedir);
  496.           pos = strlen(sysinfo.ripdir) - 2;
  497.           while ((sysinfo.ripdir[--pos] != '\\') && pos >= 0);  /* Find first \ */
  498.           sysinfo.ripdir[++pos] = 0;
  499.           strcat(sysinfo.ripdir, "RIPMENUS\\");
  500.           rip = -1;
  501.           ripdrive = -1;
  502.           rip_popup = -1;
  503.           setmenu("RIP");
  504.           oldstat = thisuser.sysstatus;
  505.           thisuser.sysstatus &= ~sysstatus_expert;
  506.           do {
  507.             rip_cls();
  508.             printmenu(350);
  509.             user_menus = getkey();
  510.           } while ((user_menus < '0' || user_menus > '6'));
  511.           thisuser.sysstatus = oldstat;
  512.           rip_cls();
  513.           if (user_menus != '0') {
  514.             sprintf(s1, "%sNAME.MNU", sysinfo.ripdir);
  515.             if ((namefile = fopen(s1, "w")) != NULL) {
  516.               fprintf(namefile, "!|T%s\n", syscfg.systemname);
  517.               fclose(namefile);
  518.             }
  519.             autox = 0;
  520.             rmenu = 300;
  521.             cleared = NEEDCLEAR;
  522.             sprintf(s2,"MN%c", user_menus);
  523.             rip_pause = pausecheck(1, s2);
  524.             setmenu("REM");
  525.             topdata = 0;
  526.             if (thisuser.sysstatus & sysstatus_expert)
  527.               pl (get_string(1506));
  528.           } else {
  529.             rip=0;
  530. #ifdef RIPDRIVE
  531.             ripdrive = 0;
  532.             rd_disable();
  533. #endif
  534.           }
  535.         } else
  536.           pl(get_string(1507));
  537.       } else
  538.         pl(get_string(1508));
  539.     }
  540.   }
  541.   if (strcmp(s, "/V")==0)
  542.     valscan();
  543.   if (strcmp(s,"/C")==0) {
  544.     write_inst(INST_LOC_CHATROOM,0,INST_FLAGS_NONE);
  545.     cleared = NEEDCLEAR;
  546.     if (exist("WWIVCHAT.EXE")) {
  547.       sprintf(s1,"WWIVCHAT.EXE %s", create_chain_file());
  548.       extern_prog(s1, sysinfo.spawn_opts[8]);
  549.     } else
  550.       chat_room();
  551.   }
  552.   if (strcmp(s,"/Z")==0) {
  553.     if (sysinfo.flags & OP_FLAGS_SLASH_SZ) {
  554.       prt(5,get_string(935));
  555.       if (yn()) {
  556.         pl(get_string(26));
  557.         set_x_only(1, "POSTS.TXT", 0);
  558.         nscan(0);
  559.         set_x_only(0, NULL, 0);
  560.         add_arc("OFFLINE", "POSTS.TXT", 0);
  561.         download_temp_arc("OFFLINE", 0);
  562.       }
  563.     }
  564.   }
  565.   if ((s[1]==0) && (s[0]!=0)) {
  566.     switch(s[0]) {
  567.       case '}':
  568.         if (okconf(&thisuser)) {
  569.           if ((curconfsub<subconfnum-1) && (uconfsub[curconfsub+1].confnum>=0))
  570.             ++curconfsub;
  571.           else
  572.             curconfsub=0;
  573.           setuconf(CONF_SUBS, curconfsub, -1);
  574.         }
  575.         break;
  576.       case '>':
  577.       case '+':
  578.       case ']':
  579.         if ((cursub<num_subs-1) && (usub[cursub+1].subnum>=0))
  580.           ++cursub;
  581.         else
  582.           cursub=0;
  583.         break;
  584.       case '{':
  585.         if (okconf(&thisuser)) {
  586.           if (curconfsub>0)
  587.             --curconfsub;
  588.           else {
  589.             while ((uconfsub[curconfsub+1].confnum>=0) && (curconfsub<subconfnum-1))
  590.               ++curconfsub;
  591.           }
  592.           setuconf(CONF_SUBS, curconfsub, -1);
  593.         }
  594.         break;
  595.       case '<':
  596.       case '-':
  597.       case '[':
  598.         if (cursub>0)
  599.           --cursub;
  600.         else {
  601.           while ((usub[cursub+1].subnum>=0) && (cursub<num_subs-1))
  602.             ++cursub;
  603.         }
  604.         break;
  605.       case '!':
  606.         helpl=14;
  607.         if (!cs())
  608.           return;
  609.         nln(2);
  610.         pl(get_string(15));
  611.         outstr(":");
  612.         input(s1,30);
  613.         i=finduser1(s1);
  614.         if (i>0) {
  615.           sysoplog(get_stringx(1,13));
  616.           valuser(i);
  617.         } else
  618.           pl(get_string(8));
  619.         break;
  620.       case '.':
  621.         helpl=26;
  622.         write_inst(INST_LOC_CHAINS,0,INST_FLAGS_NONE);
  623.         play_sdf(get_string(1030),0);
  624.         existprint(get_string(1030));
  625.         do_chains();
  626.         break;
  627.       case '$':
  628.         write_inst(INST_LOC_BANK,0,INST_FLAGS_NONE);
  629.         time_bank();
  630.         break;
  631.       case 'A':
  632.         helpl=19;
  633.         write_inst(INST_LOC_AMSG,0,INST_FLAGS_NONE);
  634.         write_automessage();
  635.         break;
  636.       case 'B':
  637.         bbslist();
  638.         break;
  639.       case 'C':
  640.         helpl=3;
  641.         reqchat();
  642.         break;
  643.       case 'D':
  644.         helpl=4;
  645.         write_inst(INST_LOC_DEFAULTS,0,INST_FLAGS_NONE);
  646.         if (existprint(get_string(1031)))
  647.           pausescr();
  648.         if (menu_on()) {
  649.           comstr(" ");
  650.           rmenu = 300;
  651.         }
  652.         defaults();
  653.         break;
  654.       case 'E':
  655.         send_email();
  656.         break;
  657.       case 'F':
  658.         write_inst(INST_LOC_FEEDBACK,0,INST_FLAGS_NONE);
  659.         feedback(0);
  660.         break;
  661.       case 'G':
  662.         helpl=28;
  663.         write_inst(INST_LOC_GFILES,0,INST_FLAGS_NONE);
  664.         existprint(get_string(1032));
  665.         gfiles();
  666.         rmenu = 300;
  667.         break;
  668.       case 'H':
  669.         hop_sub();
  670.         break;
  671.       case 'I':
  672.         nl();
  673.         if (menu_on()) {
  674.           printmenu(328);
  675.           getkey();
  676.           rip_pcb();
  677.         }
  678.         npr("%s   (%s)\r\n",wwiv_version, wwiv_date);
  679.         nl();
  680.         existprint(get_string(1033));
  681.         existprint(get_string(1034));
  682.         break;
  683.       case 'J':
  684.         if (okconf(&thisuser))
  685.           jump_conf(CONF_SUBS);
  686.         break;
  687.       case 'K':
  688.         helpl=8;
  689.         write_inst(INST_LOC_KILLEMAIL,0,INST_FLAGS_NONE);
  690.         kill_old_email();
  691.         break;
  692.       case 'L':
  693.         if (status.callstoday>0) {
  694.           if (sysinfo.flags & OP_FLAGS_SHOW_CITY_ST) {
  695.             if (syscfg.sysconfig & sysconfig_extended_info)
  696.               pl(get_string(1429));
  697.             else
  698.               pl(get_string(972));
  699.           } else {
  700.             pl(get_string(972));
  701.           }
  702.           i=okansi()?205:'=';
  703.           npr(charstr(79,i));
  704.         }
  705. #ifdef RIPDRIVE
  706.         rd_coff();
  707. #endif
  708.         existprint(get_string(1035));
  709. #ifdef RIPDRIVE
  710.         rd_con();
  711. #endif
  712.         break;
  713.       case 'M':
  714.         readmail();
  715.         break;
  716.       case 'N':
  717.         write_inst(INST_LOC_SUBS,65535,INST_FLAGS_NONE);
  718.         express=0;
  719.         expressabort=0;
  720.         nscan(0);
  721.         break;
  722.       case 'O':
  723.         if (numbatchdl!=0) {
  724.           nl();
  725.           outstr(get_string(1324));
  726.           if (ny())
  727.             batchdl(1);
  728.         }
  729.         nln(2);
  730.         prt(5,get_string(28));
  731.         helpl=12;
  732.         if (yn()) {
  733.           write_inst(INST_LOC_LOGOFF,0,INST_FLAGS_NONE);
  734.           outchr(12);
  735.           if (rip_on())
  736.             random_screen("goodbye");
  737.           outstr(get_string(29));
  738.           pl(ctim(timer()-timeon));
  739. #ifdef RIPDRIVE
  740.           rd_coff();
  741. #endif
  742.           existprint(get_string(1036));
  743.           hangup=1;
  744.         }
  745.         break;
  746.       case 'P':
  747.         irt[0]=0;
  748.         irt_name[0]=0;
  749.         grab_quotes(NULL, NULL);
  750.         if (usub[0].subnum!=-1)
  751.           post();
  752.         break;
  753.       case 'Q':
  754.         if (usub[0].subnum!=-1) {
  755.           write_inst(INST_LOC_SUBS,usub[cursub].subnum,INST_FLAGS_NONE);
  756.           i=0;
  757.           express=0;
  758.           expressabort=0;
  759.           qscan(cursub,&i);
  760.         }
  761.         break;
  762.       case 'R':
  763.         if (usub[0].subnum!=-1) {
  764.           write_inst(INST_LOC_SUBS,usub[cursub].subnum,INST_FLAGS_NONE);
  765.           helpl=15;
  766.           remove_post();
  767.         }
  768.         break;
  769.       case 'S':
  770.         if (usub[0].subnum!=-1) {
  771.           write_inst(INST_LOC_SUBS,usub[cursub].subnum,INST_FLAGS_NONE);
  772.           express=0;
  773.           expressabort=0;
  774.           scan2();
  775.         }
  776.         break;
  777.       case 'T':
  778.         if (syscfg.sysconfig & sysconfig_no_xfer) {
  779.           nl();
  780.           pl(get_string(30));
  781.           nl();
  782.           break;
  783.         }
  784.         if ((udir[0].subnum==-1) && (okconf(&thisuser))) {
  785.           for (curconfdir=0;
  786.                (curconfdir<dirconfnum) &&
  787.                (uconfdir[curconfdir].confnum!=-1);
  788.                curconfdir++) {
  789.             setuconf(CONF_DIRS, curconfdir, -1);
  790.             if (udir[0].subnum!=-1)
  791.               break;
  792.           }
  793.         }
  794.         if (udir[0].subnum!=-1) {
  795.           write_inst(INST_LOC_XFER,udir[curdir].subnum,INST_FLAGS_NONE);
  796.           curdloads=1;
  797.           play_sdf(get_string(1037),0);
  798.           existprint(get_string(1037));
  799.         } else {
  800.           nl();
  801.           pl(get_string(31));
  802.           nl();
  803.         }
  804.         if (menu_on()) {
  805.           rmenu = 300;
  806.           rip_cls();
  807.           //printmenu(310);
  808.           cleared = WASCLEARED;
  809.         }
  810.         break;
  811.       case 'U':
  812.       case '~':
  813. #ifdef RIPDRIVE
  814.         rd_coff();
  815. #endif
  816.         list_users(0);
  817. #ifdef RIPDRIVE
  818.         rd_con();
  819. #endif
  820.         break;
  821.       case 'V':
  822.         write_inst(INST_LOC_VOTE,0,INST_FLAGS_NONE);
  823.         helpl=18;
  824.         vote();
  825.         break;
  826.       case 'W':
  827.         printmenu(15);
  828.         break;
  829.       case 'X':
  830.         thisuser.sysstatus ^= sysstatus_expert;
  831.         if (rip_on()) {
  832.           comstr("!|*\r ");        /* Clear menu bar */
  833.           cleared = WASCLEARED;
  834.           if ((thisuser.sysstatus & sysstatus_expert) == 0)
  835.             rmenu = 300;                  /* Menu bar stuff */
  836.         }
  837.         break;
  838.       case 'Y':
  839.         if (rip_on() && (rip_subset == 0)) {
  840.           pl(get_string(1439));      //ripstring(5));
  841.           if (ny()) {
  842.             set_name();
  843.             pausescr();
  844.           }
  845.         }
  846.         yourinfo();
  847.         break;
  848.       case 'Z':
  849.         express=1;
  850.         expressabort=0;
  851.         tmp_disable_pause(1);
  852.         nscan(0);
  853.         express=0;
  854.         expressabort=0;
  855.         tmp_disable_pause(0);
  856.         break;
  857.       case '?':
  858.         if ((sysstatus_expert & thisuser.sysstatus))
  859.         printmenu(0);
  860.         break;
  861.       case '#':
  862.         nl();
  863.         pl(get_string(939));
  864.         nl();
  865.       case '*':
  866. #ifdef RIPDRIVE
  867.         rd_coff();
  868. #endif
  869.         sublist();
  870. #ifdef RIPDRIVE
  871.         rd_con();
  872. #endif
  873.         break;
  874.     }
  875.   }
  876.   if (rip_pause && menu_on())
  877.     if ((s[1]==0) && (strchr("~!*YBILUW#", s[0]) != NULL))
  878.       pausescr();
  879.     else if ((strcmp(s, "VER") == 0) || (strcmp(s, "/?") == 0))
  880.       pausescr();
  881.   if (cleared == HYPCLEAR) {
  882.     rmenu = 300;
  883.     cleared = NEEDCLEAR;
  884.   }
  885.   helpl=0;
  886. }
  887.  
  888. /****************************************************************************/
  889.  
  890. void dlmainmenu(void)
  891. {
  892.   char *s, s1[81],s2[81],ch;
  893.   int i,i1,i2,abort,useconf,ac;
  894.   int dlredraw = 1;
  895.   static int ripdlg = 3;
  896.  
  897.   s2[0]=0;
  898.   if (udir[curdir].subnum==-1) {
  899.     curdir=0;
  900.     if (udir[curdir].subnum==-1) {
  901.       strcpy(s2,get_string(32));
  902.     }
  903.   }
  904.  
  905.   write_inst(INST_LOC_XFER,udir[curdir].subnum,INST_FLAGS_NONE);
  906.  
  907.   tleft(1);
  908.   if (menu_on()) {
  909.     pl("\x1b[30H");
  910.     nln(5);
  911.  
  912.     if (dlredraw) {
  913.       printmenu(310);
  914.       dlredraw = 0;
  915.     }
  916.   }
  917.   if ((sysstatus_expert & thisuser.sysstatus)==0)
  918.     printmenu(ripdlg);
  919.  
  920.   if (menu_on()) {
  921.     nln(6);
  922.  
  923.     if (cleared == 0) {
  924.       cleared = WASCLEARED;
  925.     }
  926.   }
  927. #ifdef RIPDRIVE
  928.   if (rd_on())
  929.     rd_str("\x1b[0J");
  930. #endif
  931.   if (menu_on())
  932.     comstr("\x1b[0J");
  933.   nln(2);
  934.   tleft(1);
  935.  
  936.   useconf=((uconfdir[1].confnum!=-1) && okconf(&thisuser));
  937.  
  938.   if (E_C) {
  939.     npr("1T 0- 1%s\r\n",ctim(nsl()));
  940.     sprintf(s1,"7(1Conf %c7)0-7(1%s7)",dirconfs[uconfdir[curconfdir].confnum].designator,
  941.       stripcolors(dirconfs[uconfdir[curconfdir].confnum].name));
  942.     if (s2[0]==0)
  943.       sprintf(s2,"7(1%s%s7)0-7(1%s7)0 : 2",
  944.         useconf?get_string(1399):"",
  945.         udir[curdir].keys,
  946.         stripcolors(directories[udir[curdir].subnum].name));
  947.   } else {
  948.     npr("T - %s\r\n",ctim(nsl()));
  949.     sprintf(s1,"(Conf %c)-(%s)",dirconfs[uconfdir[curconfdir].confnum].designator,
  950.       stripcolors(dirconfs[uconfdir[curconfdir].confnum].name));
  951.     if (s2[0]==0)
  952.       sprintf(s2,"(%s%s)-(%s) :",
  953.         useconf?get_string(1399):"",
  954.         udir[curdir].keys,
  955.         stripcolors(directories[udir[curdir].subnum].name));
  956.   }
  957.   if (useconf) {
  958.     ansic(2);
  959.     pl(s1);
  960.   }
  961.   prt(2,s2);
  962.   helpl=2;
  963.   s=mmkey(1);
  964.   helpl=0;
  965.   if (s[0])
  966.     for (i=0; i<num_dirs; i++)
  967.       if (strcmp(udir[i].keys,s)==0)
  968.         curdir=i;
  969.   if (strlen(s)>2) {
  970.     sprintf(s1,"//%s",s);
  971.     sysopchar(s1);
  972.   } else
  973.     sysopchar(s);
  974.  
  975.   if (menu_on()) {
  976.     //comstr("!|1\x1b""0000$PCB$|w0007271610|1K|#\r ");
  977.     printmenu(313);
  978.     if (s[0] != 'T')
  979.       printmenu(320);
  980.     comstr("\x1b[30H");
  981.     nl();
  982.   }
  983.  
  984.   if (strcmp(s,"/A")==0) {
  985.     nl();
  986.     ac=0;
  987.     if ((uconfsub[1].confnum!=-1) && (okconf(&thisuser))) {
  988.       ac=1;
  989.       tmp_disable_conf(1);
  990.     }
  991.     helpl=13;
  992.     abort=0;
  993.     num_listed=0;
  994.     tagging=1;
  995.     titled=1;
  996.     nscanall();
  997.     tagging=0;
  998.     if (ac)
  999.       tmp_disable_conf(0);
  1000.   }
  1001.  
  1002.   if ((strcmp(s,"/M")==0) && menu_on()) {
  1003.     if (ripdlg == 3)
  1004.       ripdlg = 311;
  1005.     else
  1006.       ripdlg = 3;
  1007.     dlredraw = -1;
  1008.   }
  1009.  
  1010.   if (strcmp(s,"/O")==0) {
  1011.     if (numbatchdl!=0) {
  1012.       nl();
  1013.       outstr(get_string(1324));
  1014.       if (ny())
  1015.         batchdl(1);
  1016.       else
  1017.         hangup=1;
  1018.     } else
  1019.       hangup=1;
  1020.   }
  1021.   if (strcmp(s,"/S")==0) {
  1022.     if (sysinfo.flags & OP_FLAGS_SLASH_SZ) {
  1023.       tagging=2;
  1024.       prt(5,get_string(935));
  1025.       if (yn()) {
  1026.         pl(get_string(26));
  1027.         set_x_only(1,"FILES.TXT", 1);
  1028.         searchall();
  1029.         set_x_only(0, NULL, 0);
  1030.         add_arc("TEMP", "FILES.TXT", 0);
  1031.         download_temp_arc("TEMP", 0);
  1032.       }
  1033.     }
  1034.   }
  1035.  
  1036.   /* Anyone commands here */
  1037.   if (strcmp(s,"WHO")==0) {
  1038.     multi_instance();
  1039.   }
  1040.  
  1041.   /* download cosysop checks here */
  1042.   if (dcs()) {
  1043.  
  1044.     if (strcmp(s,"/?")==0)
  1045.       printmenu(8);
  1046.  
  1047.     if (strcmp(s,"READIDZ")==0)
  1048.       read_idz();
  1049.  
  1050.     if (strcmp(s,"UPLOADALL")==0) {
  1051.       i1=0;
  1052.       for (i=0; (i<num_dirs) && (udir[i].subnum>=0) && (!i1); i++) {
  1053.         nln(2);
  1054.         outstr(get_string(33));
  1055.         pl(directories[udir[i].subnum].name);
  1056.         nl();
  1057.         i1=uploadall(i);
  1058.       }
  1059.     }
  1060.  
  1061.     if (strcmp(s,"UPLOAD")==0)
  1062.       uploadall(curdir);
  1063.  
  1064.     if (strcmp(s,"REN")==0) {
  1065.       helpl=39;
  1066.       rename_file();
  1067.     }
  1068.  
  1069.     if (strcmp(s,"MOVE")==0)
  1070.       move_file();
  1071.  
  1072.     if (strcmp(s,"SORT")==0) {
  1073.       nl();
  1074.       prt(2,get_string(37));
  1075.       i=yn();
  1076.       nl();
  1077.       prt(2,get_string(38));
  1078.       if (yn())
  1079.         i1=2;
  1080.       else
  1081.         i1=0;
  1082.       tmp_disable_pause(1);
  1083.       if (i)
  1084.         sort_all(i1);
  1085.       else
  1086.         sortdir(udir[curdir].subnum,i1);
  1087.       tmp_disable_pause(0);
  1088.     }
  1089.  
  1090.     if (strcmp(s,"RSORT")==0) {
  1091.       sort_all(1);
  1092.     }
  1093.  
  1094.     if ((strcmp(s,"ALLOWEDIT")==0) || (strcmp(s,"AE")==0))
  1095.       edit_database();
  1096.  
  1097.   }
  1098.  
  1099.   /* sysop checks now */
  1100.   if (so()) {
  1101.  
  1102.     if (strcmp(s,"UPLOADFILE")==0) {
  1103.       nl();
  1104.       pl(get_string(34));
  1105.       pl(get_string(35));
  1106.       nl();
  1107.       prt(5,get_string(36));
  1108.       ch=onek("Q12");
  1109.       nl();
  1110.       if (ch!='Q') {
  1111.         outstr(get_string(7));
  1112.         inputl(s2,80);
  1113.         switch(ch) {
  1114.           case '1': i2=2; break;
  1115.           case '2': i2=0; break;
  1116.           default : i2=0; break;
  1117.         }
  1118.         upload_files(s2,curdir,i2);
  1119.       }
  1120.     }
  1121.  
  1122.     if ((strcmp(s,"DIREDIT")==0) || (strcmp(s,"DE")==0)) {
  1123.       sysoplog(get_stringx(1,3));
  1124.       dlboardedit();
  1125.     }
  1126.  
  1127.     if (strncmp(s,"DEBUG",5)==0) {
  1128.       if((s[5]) && (s[5]!=' '))
  1129.         debuglevel=s[5]-'0';
  1130.       else if(s[6])
  1131.         debuglevel=s[6]-'0';
  1132.     }
  1133.  
  1134.     if (strcmp(s,"DOS")==0) {
  1135.       if (checkpw()) {
  1136.         sysoplog(get_stringx(1,6));
  1137.         extern_prog(getenv("COMSPEC"), EFLAG_SHRINK|EFLAG_COMIO|EFLAG_ABORT);
  1138.         topscreen();
  1139.       }
  1140.     }
  1141.   }
  1142.  
  1143.   /* single-key commands here */
  1144.   if ((s[1]==0) && (s[0]!=0)) {
  1145.     if (strchr("ABDEGLUX", s[0]) != NULL)
  1146.       dlredraw = -1;
  1147.     switch(s[0]) {
  1148.       case '}':
  1149.         if (okconf(&thisuser)) {
  1150.           if ((curconfdir<dirconfnum-1) && (uconfdir[curconfdir+1].confnum>=0))
  1151.             ++curconfdir;
  1152.           else
  1153.             curconfdir=0;
  1154.           setuconf(CONF_DIRS, curconfdir, -1);
  1155.         }
  1156.         break;
  1157.       case '>':
  1158.       case '+':
  1159.       case ']':
  1160.         if ((curdir<num_dirs-1) && (udir[curdir+1].subnum>=0))
  1161.           ++curdir;
  1162.         else
  1163.           curdir=0;
  1164.         break;
  1165.       case '{':
  1166.         if (okconf(&thisuser)) {
  1167.           if (curconfdir>0)
  1168.             --curconfdir;
  1169.           else {
  1170.             while ((uconfdir[curconfdir+1].confnum>=0) && (curconfdir<dirconfnum-1))
  1171.               ++curconfdir;
  1172.           }
  1173.           setuconf(CONF_DIRS, curconfdir, -1);
  1174.         }
  1175.         break;
  1176.       case '<':
  1177.       case '-':
  1178.       case '[':
  1179.         if (curdir>0)
  1180.           --curdir;
  1181.         else {
  1182.           while ((udir[curdir+1].subnum>=0) && (curdir<num_dirs-1))
  1183.             ++curdir;
  1184.         }
  1185.         break;
  1186.       case '#':
  1187.         nl();
  1188.         pl(get_string(939));
  1189.         nl();
  1190.       case '*':
  1191. #ifdef RIPDRIVE
  1192.         rd_coff();
  1193. #endif
  1194.         dirlist();
  1195. #ifdef RIPDRIVE
  1196.         rd_con();
  1197. #endif
  1198.         break;
  1199.       case '~':
  1200. #ifdef RIPDRIVE
  1201.         rd_coff();
  1202. #endif
  1203.         list_users(1);
  1204. #ifdef RIPDRIVE
  1205.         rd_con();
  1206. #endif
  1207.         break;
  1208.       case 'Q':
  1209.         curdloads=0;
  1210.         if (rip_on()) {
  1211.           rip_cls();
  1212.           cleared = WASCLEARED;
  1213.         }
  1214.         break;
  1215.       case '.':
  1216.         if (dcs()) {
  1217.           if (!exist(dszlog))
  1218.             break;
  1219.           print_local_file(dszlog,"");
  1220.         }
  1221.         break;
  1222.       case '^':
  1223.         if (so())
  1224.           print_devices();
  1225.         break;
  1226.       case '?':
  1227.         if ((sysstatus_expert & thisuser.sysstatus)) {
  1228.           ripdlg = 3;
  1229.           printmenu(3);
  1230.         }
  1231.         break;
  1232.       case 'A':
  1233.         helpl=23;
  1234.         arc_l();
  1235.         break;
  1236.       case 'B':
  1237.         helpl=22;
  1238.         batchdl(0);
  1239.         break;
  1240.       case 'C':
  1241.         helpl=3;
  1242.         reqchat();
  1243.         break;
  1244.       case 'D':
  1245.         helpl=20;
  1246.         play_sdf(get_string(1038),0);
  1247.         existprint(get_string(1038));
  1248.         download();
  1249.         break;
  1250.       case 'E':
  1251.         helpl=29;
  1252.         temp_extract();
  1253.         break;
  1254.       case 'F':
  1255.         helpl=21;
  1256.         tagging=1;
  1257.         finddescription();
  1258.         tagging=0;
  1259.         break;
  1260.       case 'G':
  1261.         helpl=30;
  1262.         temporary_stuff();
  1263.         break;
  1264.       case 'H':
  1265.         hop_dir();
  1266.         break;
  1267.       case 'J':
  1268.         if (okconf(&thisuser))
  1269.           jump_conf(CONF_DIRS);
  1270.         break;
  1271.       case 'L':
  1272.         tagging=1;
  1273.         listfiles();
  1274.         tagging=0;
  1275.         break;
  1276.       case 'M':
  1277.         helpl=31;
  1278.         if (dcs())
  1279.           move_file();
  1280.         break;
  1281.       case 'N':
  1282.         if (sysinfo.flags & OP_FLAGS_SETLDATE) {
  1283.           helpl=13;
  1284.           setldate();
  1285.         }
  1286.         abort=0;
  1287.         num_listed=0;
  1288.         tagging=1;
  1289.         titled=1;
  1290.         nl();
  1291.         prt(5,get_string(39));
  1292.         if (yn())
  1293.           nscanall();
  1294.         else {
  1295.           nl();
  1296.           nscandir(curdir,&abort);
  1297.           if (num_listed) {
  1298.             endlist(2);
  1299.           } else {
  1300.             nl();
  1301.             ansic(2);
  1302.             pl(get_string(1039));
  1303.           }
  1304.         }
  1305.         tagging=0;
  1306.         break;
  1307.       case 'O':
  1308.         if (numbatchdl!=0) {
  1309.           nl();
  1310.           outstr(get_string(1324));
  1311.           if (ny())
  1312.             batchdl(1);
  1313.         }
  1314.         helpl=12;
  1315.         nln(2);
  1316.         prt(5,get_string(28));
  1317.         if (yn()) {
  1318.           outchr(12);
  1319.           if (rip_on())
  1320.             random_screen("goodbye");
  1321.           outstr(get_string(29));
  1322.           pl(ctim(timer()-timeon));
  1323. #ifdef RIPDRIVE
  1324.           rd_coff();
  1325. #endif
  1326.           existprint(get_string(1036));
  1327.           hangup=1;
  1328.         }
  1329.         break;
  1330.       case 'P':
  1331.         helpl=13;
  1332.         setldate();
  1333.         break;
  1334.       case 'R':
  1335.         helpl=38;
  1336.         removefile();
  1337.         break;
  1338.       case 'S':
  1339.         tagging=1;
  1340.         searchall();
  1341.         tagging=0;
  1342.         break;
  1343.       case 'T':
  1344.         helpl=32;
  1345.         xfer_defaults();
  1346.         break;
  1347.       case 'U':
  1348.         helpl=17;
  1349.         play_sdf(get_string(1040),0);
  1350.         existprint(get_string(1040));
  1351.         if ((thisuser.restrict & (restrict_validate | restrict_upload)) ||
  1352.             (syscfg.sysconfig & sysconfig_all_sysop)) {
  1353.           if (syscfg.newuploads<num_dirs)
  1354.             upload((int) syscfg.newuploads);
  1355.           else
  1356.             upload(0);
  1357.         } else
  1358.           upload(udir[curdir].subnum);
  1359.         break;
  1360.       case 'V':
  1361.         helpl=23;
  1362.         arc_l();
  1363.         break;
  1364.       case 'W':
  1365.         printmenu(16);
  1366.         break;
  1367.       case 'X':
  1368.         helpl=22;
  1369.         batchdl(0);
  1370.         break;
  1371.       case 'Y':
  1372.         yourinfodl();
  1373.         break;
  1374.       case 'Z':
  1375.         existprint("ZUPLOAD");
  1376.         nln(2);
  1377.         pl(get_string(40));
  1378.         nl();
  1379.         helpl=17;
  1380.         upload(0);
  1381.         break;
  1382.     }
  1383.   }
  1384.   helpl=0;
  1385.   if (rip_pause && menu_on())
  1386.     if ((s[1]==0) && (strchr("~*YW#", s[0]) != NULL))
  1387.       pausescr();
  1388.     else if (strcmp(s, "VER") == 0)
  1389.       pausescr();
  1390. }
  1391.  
  1392.