home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1996 December / CD_shareware_12-96.iso / DOS / Comunic / WSYS17.ZIP / MOD / FMD-40B.MOD < prev    next >
Encoding:
Text File  |  1995-08-06  |  50.2 KB  |  1,984 lines

  1.  
  2.    ┌┬─── ──  ─   ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  3.    ││                    Alternative Worlds Presents                      │
  4.    └┼─────────────────────────────────────────────────────────────────────┐
  5.    ││ Mod Name       » FMD-40b.MOD                                        │∙
  6.    ││ Difficulty     » ███▒▒▒▒▒▒▒▒ (3/10)                                 │:
  7.    ││ WWIV Version   » 4.24                                               ││
  8.    ││ Date Affected  » 08/02/95                                           ││
  9.    :│ Files Affected » SYSOPF.C / BBS.C / BBSOVL1.C / READMAIL.C / MMENU.C││
  10.    ∙│ Description    » Use WWIVsys Inside WWIV - Pulldown Menu Interface  ││
  11.     └─────────────────────────────────────────────────────────────────────┼┐
  12.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  13. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─   ─  ── ───└┘
  14.  
  15.  
  16.  ┌┬══════════════════┐
  17.  ││ Long Description ││
  18.   └══════════════════┴┘
  19.  
  20.     This modification will allow WWIVsys registered users to use WWIVsys from
  21. inside their WWIV and to replace all internal sysop functions.
  22.  
  23.     You will be able to remove internal functions also if you don't have any
  24. remote SysOp, so it will save you a lot of Dgroup and will discrease the size
  25. of your BBS.EXE and you will have more memory available.
  26.  
  27. Revision A:
  28.  
  29.  - Updated for WWIV v4.24
  30.  
  31. Revision B:
  32.  
  33.  - New pulldown menu interface added, inspired from One Eyed Willy's pulldown
  34.    menu modification for WWIV v4.10
  35.  
  36. Notes: If you only want to add the pulldown menu interface, do Step 1 and
  37.        7 only.
  38.  
  39.  ┌┬═══════┐
  40.  ││ Tests ││
  41.   └═══════┴┘
  42.  
  43.   This modification has been tested on a virgin WWIV v4.24 source using
  44.   Borland C++ v4.5
  45.  
  46. ──────────────────────────────────────────────────────────────────────────────
  47.                                    Legend
  48.                           ╔═══╤══════════════════┐
  49.                           │ + │ Add This Line    │
  50.                           │ - │ Delete This Line │
  51.                           │ * │ Modify This Line │
  52.                           │ = │ Existing Line    │
  53.                           └═══╧══════════════════╝
  54. ───[Step 1]────────────────────────────────────────────────────────────────────
  55.  
  56. Load SYSOPF.C and do the following changes:
  57.  
  58. =#include "vars.h"
  59. =
  60. =#pragma hdrstop
  61. =
  62. +#include "wwivsys.h"
  63.  
  64. And add the following function at the end of the file:
  65.  
  66. void wwivsys(int fcns)
  67. {
  68.   char s[81];
  69.  
  70.   if (incom) {
  71.     npr("\r\nCannot load WWIVsys from remote.\r\n\r\n");
  72.     return;
  73.   }
  74.   save_status();
  75.   save_config();
  76.  
  77.   switch(fcns)
  78.   {
  79.     case 0:
  80.       sprintf(s, "SYS.EXE");
  81.     break;
  82.     case ZLOG:
  83.       sprintf(s, "SYS.EXE -ZL");
  84.     break;
  85.     case AUTOVAL:
  86.       sprintf(s, "SYS.EXE -AV");
  87.     break;
  88.     case BACKUP:
  89.       sprintf(s, "SYS.EXE -BK");
  90.     break;
  91.     case BBSINFO:
  92.       sprintf(s, "SYS.EXE -BI");
  93.     break;
  94.     case CONFDIR:
  95.       save_confs(CONF_DIRS, -1, NULL);
  96.       sprintf(s, "SYS.EXE -CD");
  97.     break;
  98.     case DIREDIT:
  99.       sprintf(s, "SYS.EXE -DE");
  100.     break;
  101.     case CHAINEDIT:
  102.       sprintf(s, "SYS.EXE -CE");
  103.     break;
  104.     case FSED:
  105.       save_config();
  106.       sprintf(s, "SYS.EXE -FSED");
  107.     break;
  108.     case EXTERNAL:
  109.       save_config();
  110.       sprintf(s, "SYS.EXE -EP");
  111.     break;
  112.     case FILEEDIT:
  113.       sprintf(s, "SYS.EXE -FE");
  114.     break;
  115.     case GFILES:
  116.       sprintf(s, "SYS.EXE -GF");
  117.     break;
  118.     case GFILEEDIT:
  119.       sprintf(s, "SYS.EXE -GE");
  120.     break;
  121.     case INSTANCE:
  122.       sprintf(s, "SYS.EXE -IE");
  123.     break;
  124.     case LANGUAGE:
  125.       sprintf(s, "SYS.EXE -LE");
  126.     break;
  127.     case MODEM:
  128.       sprintf(s, "SYS.EXE -ME");
  129.     break;
  130.     case NETEDITOR:
  131.       sprintf(s, "SYS.EXE -NE");
  132.     break;
  133.     case PATH:
  134.       sprintf(s, "SYS.EXE -PATH");
  135.     break;
  136.     case PROTOCOL:
  137.       sprintf(s, "SYS.EXE -PE");
  138.     break;
  139.     case SLRECEDIT:
  140.       sprintf(s, "SYS.EXE -SE");
  141.     break;
  142.     case CALLOUT:
  143.       sprintf(s, "SYS.EXE -CA");
  144.     break;
  145.     case CONFIG:
  146.       sprintf(s, "SYS.EXE -CFG");
  147.     break;
  148.     case SSMEDITOR:
  149.       sprintf(s, "SYS.EXE -SSM");
  150.     break;
  151.     case STATISTICS:
  152.       sprintf(s, "SYS.EXE -STAT");
  153.     break;
  154.     case STRINGEDIT:
  155.       close_strfiles();
  156.       sprintf(s, "SYS.EXE -ESE");
  157.     break;
  158.     case CONFBOARD:
  159.       save_confs(CONF_SUBS, -1, NULL);
  160.       save_subs();
  161.       sprintf(s, "SYS.EXE -CB");
  162.     break;
  163.     case BOARDEDIT:
  164.       save_subs();
  165.       sprintf(s, "SYS.EXE -BE");
  166.     break;
  167.     case SUBLIST:
  168.       save_subs();
  169.       sprintf(s, "SYS.EXE -SL");
  170.     break;
  171.     case UEDIT:
  172.       sprintf(s, "SYS.EXE -UE");
  173.     break;
  174.     case IVOTE:
  175.       sprintf(s, "SYS.EXE -IV");
  176.     break;
  177.     case INISWITCH:
  178.       sprintf(s, "SYS.EXE -INI");
  179.     break;
  180.     case INIEDITOR:
  181.       sprintf(s, "SYS.EXE -INIE");
  182.     break;
  183.     case WHO:
  184.       sprintf(s, "SYS.EXE -WHO");
  185.     break;
  186.   }
  187.   extern_prog(s, EFLAG_SHRINK|EFLAG_INTERNAL|EFLAG_TOPSCREEN|EFLAG_COMIO);
  188.   read_config();
  189.   read_status();
  190.   switch(fcns)
  191.   {
  192.     case CONFDIR:
  193.       read_in_conferences(CONF_DIRS);
  194.       read_dirs();
  195.     break;
  196.     case DIREDIT:
  197.       read_dirs();
  198.     break;
  199.     case CHAINEDIT:
  200.       read_chains();
  201.     break;
  202.     case GFILES:
  203.       read_gfile();
  204.     break;
  205.     case CONFIG:
  206.       read_ini_info();
  207.     break;
  208.     case STRINGEDIT:
  209.       set_language(thisuser.language);
  210.     break;
  211.     case CONFBOARD:
  212.       read_in_conferences(CONF_SUBS);
  213.       read_subs();
  214.     break;
  215.     case BOARDEDIT:
  216.       read_subs();
  217.     break;
  218.     case SUBLIST:
  219.       read_subs();
  220.     break;
  221.     case IVOTE:
  222.       read_voting();
  223.     break;
  224.     case INISWITCH:
  225.     case INIEDITOR:
  226.       read_ini_info();
  227.     break;
  228.   }
  229. }
  230.  
  231. Save SYSOPF.C
  232.  
  233. ───[Step 2]────────────────────────────────────────────────────────────────────
  234.  
  235. Now you have to select if you would like to remove internal functions or not.
  236. If you have remote SysOps, you shouldn't remove them, and if you do remove
  237. them, you will save a lot of Dgroup space, but in another hand, if you remove
  238. them you will ALWAYS use WWIVsys, so you better think about it.
  239.  
  240. Step 2a is to keep internal functions.
  241.  
  242. Step 2b is to remove all internal SysOp functions.
  243.  
  244.  
  245. ───[Step 2a]───────────────────────────────────────────────────────────────────
  246.  
  247. Load MMENU.C and do the following changes:
  248.  
  249. =#include "vars.h"
  250. =
  251. =#pragma hdrstop
  252. =
  253. =#include "ripint.h"
  254. =#include <ctype.h>
  255. +#include "wwivsys.h"
  256.  
  257. And now in function mainmenu:
  258.  
  259. /**************************************************/
  260. =  if (so()) {
  261. =    if ((strcmp(s,"ALLOWEDIT")==0) || (strcmp(s,"AE")==0))
  262. =      edit_database();
  263. =    if ((strcmp(s,"READINI")==0) || (strcmp(s,"RI")==0)) {
  264. =      if (!read_ini_info()) {
  265. =        printf(get_string(1504));
  266. =        end_bbs(noklevel);
  267. =      }
  268. =      if (!chains_reg)
  269. =        sysinfo.flags &= ~OP_FLAGS_CHAIN_REG;
  270. =      topscreen();
  271. =    }
  272. =    if ((strcmp(s,"INSTEDIT")==0) || (strcmp(s,"IE")==0))
  273. =      instance_edit();
  274. =    if ((strcmp(s,"CONFEDIT")==0) || (strcmp(s,"JE")==0)) {
  275. =      write_inst(INST_LOC_CONFEDIT,0,INST_FLAGS_ONLINE);
  276. =      edit_confs();
  277. =    }
  278. =    if ((strcmp(s,"BOARDEDIT")==0) || (strcmp(s,"BE")==0)) {
  279. =      write_inst(INST_LOC_BOARDEDIT,0,INST_FLAGS_ONLINE);
  280. =      sysoplog(get_stringx(1,2));
  281. +      if (incom)
  282. =        boardedit();
  283. +      else
  284. +        wwivsys(BOARDEDIT);
  285. =    }
  286. =    if ((strcmp(s,"CHAINEDIT")==0) || (strcmp(s,"CE")==0)) {
  287. =      write_inst(INST_LOC_CHAINEDIT,0,INST_FLAGS_ONLINE);
  288. =      sysoplog(get_stringx(1,4));
  289. +      if (incom)
  290. =        chainedit();
  291. +      else
  292. +        wwivsys(CHAINEDIT);
  293. =    }
  294. =    if (strcmp(s, "CHAT")==0) {
  295. =      nl();
  296. =      pl(((*(char far *)0x00000417L ^= 0x10) & 0x10) ?
  297. =                       get_string(21) :
  298. =                       get_string(22));
  299. =      sysoplog(get_stringx(1,9));
  300. =      topscreen();
  301. =    }
  302. =    if ((strcmp(s,"CHUSER")==0) || (strcmp(s,"CU")==0)) {
  303. =      write_inst(INST_LOC_CHUSER,0,INST_FLAGS_ONLINE);
  304. =      chuser();
  305. =    }
  306. =    if (strcmp(s,"CLOUT")==0) {
  307. =      npr("\r\nNot Yet.\r\n");
  308. =    /*  force_callout(2); */
  309. =    }
  310. =    if (strncmp(s,"DEBUG",5)==0) {
  311. =      if((s[5]) && (s[5]!=' '))
  312. =        debuglevel=s[5]-'0';
  313. =      else if(s[6])
  314. =        debuglevel=s[6]-'0';
  315. =    }
  316. =    if ((strcmp(s,"DIREDIT")==0) || (strcmp(s,"DE")==0)) {
  317. =      write_inst(INST_LOC_DIREDIT,0,INST_FLAGS_ONLINE);
  318. =      sysoplog(get_stringx(1,3));
  319. +      if (incom)
  320. =        dlboardedit();
  321. +      else
  322. +        wwivsys(DIREDIT);
  323. =    }
  324. =    if (strcmp(s,"DOS")==0) {
  325. =      if (checkpw()) {
  326. =        write_inst(INST_LOC_DOS,0,INST_FLAGS_ONLINE);
  327. =        sysoplog(get_stringx(1,6));
  328. =        extern_prog(getenv("COMSPEC"), EFLAG_SHRINK|EFLAG_COMIO|EFLAG_ABORT);
  329. =      }
  330. =    }
  331. =    if ((strcmp(s,"EDIT")==0)) {
  332. =      if (checkpw()) {
  333. =        write_inst(INST_LOC_TEDIT,0,INST_FLAGS_ONLINE);
  334. =        nl();
  335. =        prt(2,get_string(7));
  336. =        input(s1,50);
  337. =        if (s1[0]) {
  338. =          if ((okansi()) && (thisuser.defed))
  339. =            external_edit(s1,"",thisuser.defed-1,500,".",s1,1);
  340. =          else
  341. =            tedit(s1);
  342. =        }
  343. =      }
  344. =    }
  345. =    if ((strcmp(s,"GFILEEDIT")==0) || (strcmp(s,"GE")==0)) {
  346. =      write_inst(INST_LOC_GFILEEDIT,0,INST_FLAGS_ONLINE);
  347. =      sysoplog(get_stringx(1,5));
  348. +      if (incom)
  349. =        gfileedit();
  350. +      else
  351. +        wwivsys(GFILEEDITOR);
  352. =    }
  353. =    if (strcmp(s,"LOAD")==0) {
  354. =      nl();
  355. =      prt(2,get_string(7));
  356. =      input(s1,50);
  357. =      if (s1[0]) {
  358. =        nl();
  359. =        prt(5,get_string(17));
  360. =        if (yn()) {
  361. =          nl();
  362. =          load_workspace(s1,0);
  363. =        } else {
  364. =          nl();
  365. =          load_workspace(s1,1);
  366. =        }
  367. =      }
  368. =    }
  369. =    if (strcmp(s,"MAILR")==0) {
  370. =      if (checkpw()) {
  371. =        write_inst(INST_LOC_MAILR,0,INST_FLAGS_ONLINE);
  372. =        sysoplog(get_stringx(1,8));
  373. =        mailr();
  374. =      }
  375. =    }
  376. =    if ((strcmp(s,"REBOOT")==0) && (checkpw())) {
  377. =      write_inst(INST_LOC_REBOOT,0,INST_FLAGS_ONLINE);
  378. =      dtr(0);
  379. =      sysoplog(get_stringx(1,7));
  380. =      logoff();
  381. =      sl1(1,"");
  382. =      if (ok_modem_stuff)
  383. =        closeport();
  384. =      close_strfiles();
  385. =      Wait(3.0);
  386. =#ifdef __OS2__
  387. =      sprintf(s2, "/IBD:%c", syscfg.ramdrive);
  388. =      execlp("setboot.exe", "setboot.exe", s2, NULL);
  389. =#else
  390. =      setvect(0xff,(void interrupt (*) ()) MK_FP(0xffff,0x0000));
  391. =      geninterrupt(0xff);
  392. =#endif
  393. =    }
  394. =    if (strcmp(s,"RELOAD")==0) {
  395. =      write_inst(INST_LOC_RELOAD,0,INST_FLAGS_ONLINE);
  396. =      read_new_stuff();
  397. =    }
  398. =    if (strcmp(s,"RESETF")==0) {
  399. =      write_inst(INST_LOC_RESETF,0,INST_FLAGS_ONLINE);
  400. =      reset_files();
  401. =    }
  402. =    if (strcmp(s, "RESETQSCAN")==0) {
  403. =      prt(5,get_string(970));
  404. =      if (yn()) {
  405. =        write_inst(INST_LOC_RESETQSCAN,0,INST_FLAGS_NONE);
  406. =        for (i=0; i<=number_userrecs(); i++) {
  407. =          read_qscn(i, qsc, 1);
  408. =          memset(qsc_p,
  409. =                 0,
  410. =                 syscfg.qscn_len - 4*(1+((max_dirs+31)/32)+((max_subs+31)/32)));
  411. =          write_qscn(i, qsc, 1);
  412. =        }
  413. =        read_qscn(1, qsc, 0);
  414. =        close_qscn();
  415. =      }
  416. =    }
  417. =    if (strcmp(s,"STAT")==0) {
  418. =      read_status();
  419. =      nl();
  420. =#ifndef __OS2__
  421. =      outstr(get_string(18));
  422. =      pln(_stklen);
  423. =#endif
  424. =      outstr(get_string(19));
  425. =      npr("%dk\r\n", (int) (farcoreleft()/1024));
  426. =      outstr(get_string(20));
  427. =      npr("%d%%\r\n", cachestat());
  428. =      outstr(get_string(938));
  429. =      npr("%lu\r\n",status.qscanptr);
  430. =      nl();
  431. =    }
  432. =  }
  433. =    if (strcmp(s,"PACK")==0) {
  434. =      nl();
  435. =      prt(5, get_string(1505));
  436. =      if (yn())
  437. =        pack_all_subs();
  438. =      else
  439. =        pack_sub(usub[cursub].subnum);
  440. =    }
  441. =  }
  442. =/**************************************************/
  443. =  if (cs()) {
  444. =    if (strcmp(s,"IVOTES")==0) {
  445. =      write_inst(INST_LOC_VOTE,0,INST_FLAGS_ONLINE);
  446. =      sysoplog(get_stringx(1,11));
  447. +      if (incom)
  448. =        ivotes();
  449. +      else
  450. +        wwivsys(IVOTE);
  451. =    }
  452. =    if (strcmp(s,"LOG")==0) {
  453. =      slname(date(), s1);
  454. =      print_local_file(s1,"");
  455. =    }
  456. =    if (strcmp(s,"NLOG")==0) {
  457. =      print_local_file("NET.LOG","");
  458. =    }
  459. =    if (strcmp(s,"PENDING")==0) {
  460. =      print_pending_list();
  461. =    }
  462. =    if (strcmp(s,"STATUS")==0) {
  463. =      prstatus();
  464. =    }
  465. =    if (strcmp(s,"TEDIT")==0) {
  466. =      write_inst(INST_LOC_TEDIT,0,INST_FLAGS_ONLINE);
  467. =      sysoplog(get_stringx(1,12));
  468. =      text_edit();
  469. =    }
  470. =    if ((strcmp(s,"UEDIT")==0) || (strcmp(s,"UE")==0)) {
  471. =      write_inst(INST_LOC_UEDIT,0,INST_FLAGS_ONLINE);
  472. =      sysoplog(get_stringx(1,10));
  473. +      if (incom)
  474. =        uedit(usernum,0);
  475. +      else
  476. +        wwivsys(UEDIT);
  477. =    }
  478. =    if (strcmp(s,"VOTEPRINT")==0) {
  479. =      write_inst(INST_LOC_VOTEPRINT,0,INST_FLAGS_ONLINE);
  480. =      voteprint();
  481. =    }
  482. =    if (strcmp(s,"YLOG")==0) {
  483. =      read_status();
  484. =      print_local_file(status.log1,"");
  485. =    }
  486. =    if (strcmp(s,"ZLOG")==0) {
  487. +      if (incom)
  488. =        zlog();
  489. +      else
  490. +        wwivsys(ZLOG);
  491. =    }
  492. +    if (strcmp(s, "WWIVSYS")==0) {
  493. +      if (!incom)
  494. +        wwivsys(0);
  495. +    }
  496. =    if ((strcmp(s,",")==0) && ((net_sysnum>0) || (net_num_max>1))) {
  497. =      nl();
  498. =      prt(2,get_string(23));
  499. =      ch=onek("Q012");
  500. =      switch(ch) {
  501. =        case '0': print_local_file(get_string(1027),""); break;
  502. =        case '1': print_local_file(get_string(1028),""); break;
  503. =        case '2': print_local_file(get_string(1029),""); break;
  504. =      }
  505. =    }
  506. =    if (strcmp(s,"/?")==0) {
  507. =      printmenu(5);
  508. =    }
  509. =  }
  510. =/*************************************************/
  511.  
  512. Lower in function dlmainmenu:
  513.  
  514. =    if ((strcmp(s,"DIREDIT")==0) || (strcmp(s,"DE")==0)) {
  515. =      sysoplog(get_stringx(1,3));
  516. +      if (incom)
  517. =        dlboardedit();
  518. +      else
  519. +        wwivsys(DIREDIT);
  520. =    }
  521. =
  522. =    if (strncmp(s,"DEBUG",5)==0) {
  523.  
  524. Load BBS.C and modify this at the top of the file:
  525.  
  526. =#define _DEFINE_GLOBALS_
  527. =#include "vars.h"
  528. =#include "subxtr.h"
  529. =#include <math.h>
  530. +#include "wwivsys.h"
  531. =
  532. =#ifdef __OS2__
  533.  
  534. Then, in function getcaller:
  535.  
  536. =        case 'B':
  537. =          okskey=1;
  538. =          if (ok_local()) {
  539. =            write_inst(INST_LOC_BOARDEDIT,0,INST_FLAGS_NONE);
  540. =            holdphone(1);
  541. *            wwivsys(BOARDEDIT);
  542. =            cleanup_net();
  543. =            holdphone(0);
  544. =          }
  545. =          okskey=0;
  546. =          break;
  547. =        case 'C':
  548. =          okskey=1;
  549. =          if (ok_local()) {
  550. =            write_inst(INST_LOC_CHAINEDIT,0,INST_FLAGS_NONE);
  551. =            holdphone(1);
  552. *            wwivsys(CHAINEDIT);
  553. =            holdphone(0);
  554. =          }
  555. =          okskey=0;
  556. =          break;
  557. =        case 'D':
  558. =          okskey=1;
  559. =          if (ok_local()) {
  560. =            write_inst(INST_LOC_DIREDIT,0,INST_FLAGS_NONE);
  561. =            holdphone(1);
  562. *            wwivsys(DIREDIT);
  563. =            holdphone(0);
  564. =          }
  565. =          okskey=0;
  566. =          break;
  567. =        case 'W':
  568. =          okskey=1;
  569. =          if (ok_local()) {
  570. =            write_inst(INST_LOC_TEDIT,0,INST_FLAGS_NONE);
  571. =            holdphone(1);
  572. =            text_edit();
  573. =            holdphone(0);
  574. =          }
  575. =          okskey=0;
  576. =          break;
  577. =        case 'F':
  578. =          if (ok_local()) {
  579. =            write_inst(INST_LOC_DOS,0,INST_FLAGS_NONE);
  580. =            holdphone(1);
  581. =            nl();
  582. =            pl(get_string(43));
  583. =            nl();
  584. =            setvect(save_dos,NULL);
  585. =            do_remote(getenv("COMSPEC"),0);
  586. =            setvect(save_dos, getvect(INT_REAL_DOS));
  587. =            out1ch(12);
  588. =            cleanup_net();
  589. =            holdphone(0);
  590. =          }
  591. =          break;
  592. =        case 'G':
  593. =          okskey=1;
  594. =          if (ok_local()) {
  595. =            write_inst(INST_LOC_GFILEEDIT,0,INST_FLAGS_NONE);
  596. =            holdphone(1);
  597. *            wwivsys(GFILEEDITOR);
  598. =            holdphone(0);
  599. =          }
  600. =          okskey=0;
  601. =          break;
  602. =        case 'I':
  603. =          okskey=1;
  604. =          if (ok_local()) {
  605. =            write_inst(INST_LOC_VOTEEDIT,0,INST_FLAGS_NONE);
  606. =            holdphone(1);
  607. *            wwivsys(IVOTE);
  608. =            holdphone(0);
  609. =          }
  610. =          okskey=0;
  611. =          break;
  612. =        case 'J':
  613. =          if (ok_local()) {
  614. =            holdphone(1);
  615. =            edit_confs();
  616. =            holdphone(0);
  617. =          }
  618. =          break;
  619. =        case 'K':
  620. =          if (ok_local()) {
  621. =            usernum=1;
  622. =            useron=1;
  623. =            holdphone(1);
  624. =            okskey=1;
  625. =            prt(2,get_string(44));
  626. =            input(s,50);
  627. =            load_workspace(s,0);
  628. =            send_email();
  629. =            okskey=0;
  630. =            useron=0;
  631. =            write_user(1,&thisuser);
  632. =            cleanup_net();
  633. =            holdphone(0);
  634. =          }
  635. =          break;
  636. =        case 'L':
  637. =          if (ok_local()) {
  638. =            read_status();
  639. =            slname(date(), s);
  640. =            print_local_file(s,status.log1);
  641. =          }
  642. =          break;
  643. =        case 'M':
  644. =          okskey=1;
  645. =          if (ok_local()) {
  646. =            write_inst(INST_LOC_MAILR,0,INST_FLAGS_NONE);
  647. =            holdphone(1);
  648. =            mailr();
  649. =            holdphone(0);
  650. =          }
  651. =          okskey=0;
  652. =          break;
  653. =        case 'N':
  654. =          if (ok_local())
  655. =            print_local_file("NET.LOG","NETDAT*.LOG");
  656. =          break;
  657. =        case 'P':
  658. =          if (ok_local())
  659. =            print_pending_list();
  660. =          break;
  661. =        case 'Q':
  662. =          end_bbs(QUIT_LEVEL);
  663. =          break;
  664. =        case 27:
  665. =          outstr(get_string(1043));
  666. =          if (yn())
  667. =            end_bbs(QUIT_LEVEL);
  668. =          clrscrb();
  669. =          break;
  670. =        case 'R':
  671. =          if (ok_local()) {
  672. =            usernum=1;
  673. =            holdphone(1);
  674. =            okskey=1;
  675. =            readmail();
  676. =            okskey=0;
  677. =            write_user(1,&thisuser);
  678. =            cleanup_net();
  679. =            holdphone(0);
  680. =          }
  681. =          break;
  682. =        case 'S':
  683. =          if (ok_local()) {
  684. =            prstatus();
  685. =            getkey();
  686. =          }
  687. =          break;
  688. =        case 'T':
  689. =          if ((ok_local()) && (syscfg.terminal[0])) {
  690. =            if (syscfg.sysconfig & sysconfig_shrink_term)
  691. =              shrink_out(syscfg.terminal,0,0,0,1);
  692. =            else
  693. =              run_external(syscfg.terminal);
  694. =            imodem(1);
  695. =            imodem(0);
  696. =          }
  697. =          break;
  698. =        case 'U':
  699. =          okskey=1;
  700. =          if (ok_local()) {
  701. =            write_inst(INST_LOC_UEDIT,0,INST_FLAGS_NONE);
  702. =            holdphone(1);
  703. +            wwivsys(UEDIT);
  704. =            holdphone(0);
  705. =          }
  706. =          okskey=0;
  707. =          break;
  708. =        case 'E':
  709. =          if (ok_local()) {
  710. =            usernum=1;
  711. =            useron=1;
  712. =            holdphone(1);
  713. =            okskey=1;
  714. =            send_email();
  715. =            okskey=0;
  716. =            useron=0;
  717. =            write_user(1,&thisuser);
  718. =            cleanup_net();
  719. =            holdphone(0);
  720. =          }
  721. =          break;
  722. =        case 'X':
  723. =          for(i=0;i<50;i++) {
  724. =            if(xenviron[i]!=NULL)
  725. =              npr("\r\nxenv %d=%s",i,xenviron[i]);
  726. =          }
  727. =          npr("\r\nreal=%x, new=%x",INT_REAL_DOS,save_dos);
  728. =          nl();
  729. =          pausescr();
  730. =        break;
  731. =        case 'Y':
  732. =          if (ok_local()) {
  733. =            read_status();
  734. =            slname(date(), s);
  735. =            print_local_file(status.log1,s);
  736. =          }
  737. =          break;
  738. =        case 'Z':
  739. =          if (ok_local()) {
  740. *            wwivsys(ZLOG);
  741. =            nl();
  742. =            getkey();
  743. =          }
  744. =          break;
  745. =        case '/':
  746. =          if ((net_sysnum) && (ok_local()))
  747. =            force_callout(0);
  748. =          break;
  749. =        case '.':
  750. =          if ((net_sysnum) && (ok_local()))
  751. =            force_callout(1);
  752. =          break;
  753. =        case ',':
  754. =          if ((net_sysnum>0) || (net_num_max>1) && ok_local()) {
  755. =            nl();
  756. =            prt(2,get_string(23));
  757. =            ch=onek("Q012");
  758. =            switch (ch) {
  759. =              case '0':
  760. =                print_local_file(get_string(1027),"");
  761. =                break;
  762. =              case '1':
  763. =                print_local_file(get_string(1028),"");
  764. =                break;
  765. =              case '2':
  766. =                print_local_file(get_string(1029),"");
  767. =                break;
  768. =            }
  769. =          }
  770. =          break;
  771. =        case '`':
  772. =          if ((net_sysnum) && (ok_local())) {
  773. =            holdphone(1);
  774. =            print_net_listing(1);
  775. =            holdphone(0);
  776. =          }
  777. =          break;
  778. =        case 9:
  779. =          if (ok_local()) {
  780. =            holdphone(1);
  781. =            instance_edit();
  782. =            holdphone(0);
  783. =          }
  784. =          break;
  785. +        case '@':
  786. +          if (ok_local()) {
  787. +            holdphone(1);
  788. +            wwivsys(0);
  789. +            holdphone(0);
  790. +          }
  791. +          break;
  792. =      }
  793. =      if (!incom && !lokb) {
  794.  
  795.  
  796. Save BBS.C
  797.  
  798. ───[Step 2b]───────────────────────────────────────────────────────────────────
  799.  
  800. Load MMENU.C and do the following changes:
  801.  
  802. =#pragma hdrstop
  803. =
  804. =#define _DEFINE_GLOBALS_
  805. =#include "vars.h"
  806. =#include "subxtr.h"
  807. +#include "wwivsys.h"
  808. =
  809. =#include <math.h>
  810.  
  811. And now in function mainmenu:
  812.  
  813. /**************************************************/
  814. =  if (so()) {
  815. =    if ((strcmp(s,"ALLOWEDIT")==0) || (strcmp(s,"AE")==0))
  816. =      edit_database();
  817. =    if ((strcmp(s,"READINI")==0) || (strcmp(s,"RI")==0)) {
  818. =      if (!read_ini_info()) {
  819. =        printf(get_string(1504));
  820. =        end_bbs(noklevel);
  821. =      }
  822. =      if (!chains_reg)
  823. =        sysinfo.flags &= ~OP_FLAGS_CHAIN_REG;
  824. =      topscreen();
  825. =    }
  826. =    if ((strcmp(s,"INSTEDIT")==0) || (strcmp(s,"IE")==0))
  827. =      instance_edit();
  828. =    if ((strcmp(s,"CONFEDIT")==0) || (strcmp(s,"JE")==0)) {
  829. =      write_inst(INST_LOC_CONFEDIT,0,INST_FLAGS_ONLINE);
  830. =      edit_confs();
  831. =    }
  832. =    if ((strcmp(s,"BOARDEDIT")==0) || (strcmp(s,"BE")==0)) {
  833. =      write_inst(INST_LOC_BOARDEDIT,0,INST_FLAGS_ONLINE);
  834. =      sysoplog(get_stringx(1,2));
  835. +      wwivsys(BOARDEDIT);
  836. =    }
  837. =    if ((strcmp(s,"CHAINEDIT")==0) || (strcmp(s,"CE")==0)) {
  838. =      write_inst(INST_LOC_CHAINEDIT,0,INST_FLAGS_ONLINE);
  839. =      sysoplog(get_stringx(1,4));
  840. +      wwivsys(CHAINEDIT);
  841. =    }
  842. =    if (strcmp(s, "CHAT")==0) {
  843. =      nl();
  844. =      pl(((*(char far *)0x00000417L ^= 0x10) & 0x10) ?
  845. =                       get_string(21) :
  846. =                       get_string(22));
  847. =      sysoplog(get_stringx(1,9));
  848. =      topscreen();
  849. =    }
  850. =    if ((strcmp(s,"CHUSER")==0) || (strcmp(s,"CU")==0)) {
  851. =      write_inst(INST_LOC_CHUSER,0,INST_FLAGS_ONLINE);
  852. =      chuser();
  853. =    }
  854. =    if (strcmp(s,"CLOUT")==0) {
  855. =      npr("\r\nNot Yet.\r\n");
  856. =    /*  force_callout(2); */
  857. =    }
  858. =    if (strncmp(s,"DEBUG",5)==0) {
  859. =      if((s[5]) && (s[5]!=' '))
  860. =        debuglevel=s[5]-'0';
  861. =      else if(s[6])
  862. =        debuglevel=s[6]-'0';
  863. =    }
  864. =    if ((strcmp(s,"DIREDIT")==0) || (strcmp(s,"DE")==0)) {
  865. =      write_inst(INST_LOC_DIREDIT,0,INST_FLAGS_ONLINE);
  866. =      sysoplog(get_stringx(1,3));
  867. +      wwivsys(DIREDIT);
  868. =    }
  869. =    if (strcmp(s,"DOS")==0) {
  870. =      if (checkpw()) {
  871. =        write_inst(INST_LOC_DOS,0,INST_FLAGS_ONLINE);
  872. =        sysoplog(get_stringx(1,6));
  873. =        extern_prog(getenv("COMSPEC"), EFLAG_SHRINK|EFLAG_COMIO|EFLAG_ABORT);
  874. =      }
  875. =    }
  876. =    if ((strcmp(s,"EDIT")==0)) {
  877. =      if (checkpw()) {
  878. =        write_inst(INST_LOC_TEDIT,0,INST_FLAGS_ONLINE);
  879. =        nl();
  880. =        prt(2,get_string(7));
  881. =        input(s1,50);
  882. =        if (s1[0]) {
  883. =          if ((okansi()) && (thisuser.defed))
  884. =            external_edit(s1,"",thisuser.defed-1,500,".",s1,1);
  885. =          else
  886. =            tedit(s1);
  887. =        }
  888. =      }
  889. =    }
  890. =    if ((strcmp(s,"GFILEEDIT")==0) || (strcmp(s,"GE")==0)) {
  891. =      write_inst(INST_LOC_GFILEEDIT,0,INST_FLAGS_ONLINE);
  892. =      sysoplog(get_stringx(1,5));
  893. +      wwivsys(GFILEEDITOR);
  894. =    }
  895. =    if (strcmp(s,"LOAD")==0) {
  896. =      nl();
  897. =      prt(2,get_string(7));
  898. =      input(s1,50);
  899. =      if (s1[0]) {
  900. =        nl();
  901. =        prt(5,get_string(17));
  902. =        if (yn()) {
  903. =          nl();
  904. =          load_workspace(s1,0);
  905. =        } else {
  906. =          nl();
  907. =          load_workspace(s1,1);
  908. =        }
  909. =      }
  910. =    }
  911. =    if (strcmp(s,"MAILR")==0) {
  912. =      if (checkpw()) {
  913. =        write_inst(INST_LOC_MAILR,0,INST_FLAGS_ONLINE);
  914. =        sysoplog(get_stringx(1,8));
  915. =        mailr();
  916. =      }
  917. =    }
  918. =    if ((strcmp(s,"REBOOT")==0) && (checkpw())) {
  919. =      write_inst(INST_LOC_REBOOT,0,INST_FLAGS_ONLINE);
  920. =      dtr(0);
  921. =      sysoplog(get_stringx(1,7));
  922. =      logoff();
  923. =      sl1(1,"");
  924. =      if (ok_modem_stuff)
  925. =        closeport();
  926. =      close_strfiles();
  927. =      Wait(3.0);
  928. =#ifdef __OS2__
  929. =      sprintf(s2, "/IBD:%c", syscfg.ramdrive);
  930. =      execlp("setboot.exe", "setboot.exe", s2, NULL);
  931. =#else
  932. =      setvect(0xff,(void interrupt (*) ()) MK_FP(0xffff,0x0000));
  933. =      geninterrupt(0xff);
  934. =#endif
  935. =    }
  936. =    if (strcmp(s,"RELOAD")==0) {
  937. =      write_inst(INST_LOC_RELOAD,0,INST_FLAGS_ONLINE);
  938. =      read_new_stuff();
  939. =    }
  940. =    if (strcmp(s,"RESETF")==0) {
  941. =      write_inst(INST_LOC_RESETF,0,INST_FLAGS_ONLINE);
  942. =      reset_files();
  943. =    }
  944. =    if (strcmp(s, "RESETQSCAN")==0) {
  945. =      prt(5,get_string(970));
  946. =      if (yn()) {
  947. =        write_inst(INST_LOC_RESETQSCAN,0,INST_FLAGS_NONE);
  948. =        for (i=0; i<=number_userrecs(); i++) {
  949. =          read_qscn(i, qsc, 1);
  950. =          memset(qsc_p,
  951. =                 0,
  952. =                 syscfg.qscn_len - 4*(1+((max_dirs+31)/32)+((max_subs+31)/32)));
  953. =          write_qscn(i, qsc, 1);
  954. =        }
  955. =        read_qscn(1, qsc, 0);
  956. =        close_qscn();
  957. =      }
  958. =    }
  959. =    if (strcmp(s,"STAT")==0) {
  960. =      read_status();
  961. =      nl();
  962. =#ifndef __OS2__
  963. =      outstr(get_string(18));
  964. =      pln(_stklen);
  965. =#endif
  966. =      outstr(get_string(19));
  967. =      npr("%dk\r\n", (int) (farcoreleft()/1024));
  968. =      outstr(get_string(20));
  969. =      npr("%d%%\r\n", cachestat());
  970. =      outstr(get_string(938));
  971. =      npr("%lu\r\n",status.qscanptr);
  972. =      nl();
  973. =    }
  974. =  }
  975. =    if (strcmp(s,"PACK")==0) {
  976. =      nl();
  977. =      prt(5, get_string(1505));
  978. =      if (yn())
  979. =        pack_all_subs();
  980. =      else
  981. =        pack_sub(usub[cursub].subnum);
  982. =    }
  983. =  }
  984. =/**************************************************/
  985. =  if (cs()) {
  986. =    if (strcmp(s,"IVOTES")==0) {
  987. =      write_inst(INST_LOC_VOTE,0,INST_FLAGS_ONLINE);
  988. =      sysoplog(get_stringx(1,11));
  989. +      wwivsys(IVOTE);
  990. =    }
  991. =    if (strcmp(s,"LOG")==0) {
  992. =      slname(date(), s1);
  993. =      print_local_file(s1,"");
  994. =    }
  995. =    if (strcmp(s,"NLOG")==0) {
  996. =      print_local_file("NET.LOG","");
  997. =    }
  998. =    if (strcmp(s,"PENDING")==0) {
  999. =      print_pending_list();
  1000. =    }
  1001. =    if (strcmp(s,"STATUS")==0) {
  1002. =      prstatus();
  1003. =    }
  1004. =    if (strcmp(s,"TEDIT")==0) {
  1005. =      write_inst(INST_LOC_TEDIT,0,INST_FLAGS_ONLINE);
  1006. =      sysoplog(get_stringx(1,12));
  1007. =      text_edit();
  1008. =    }
  1009. =    if ((strcmp(s,"UEDIT")==0) || (strcmp(s,"UE")==0)) {
  1010. =      write_inst(INST_LOC_UEDIT,0,INST_FLAGS_ONLINE);
  1011. =      sysoplog(get_stringx(1,10));
  1012. +      wwivsys(UEDIT);
  1013. =    }
  1014. =    if (strcmp(s,"VOTEPRINT")==0) {
  1015. =      write_inst(INST_LOC_VOTEPRINT,0,INST_FLAGS_ONLINE);
  1016. =      voteprint();
  1017. =    }
  1018. =    if (strcmp(s,"YLOG")==0) {
  1019. =      read_status();
  1020. =      print_local_file(status.log1,"");
  1021. =    }
  1022. =    if (strcmp(s,"ZLOG")==0) {
  1023. +      wwivsys(ZLOG);
  1024. =    }
  1025. +    if (strcmp(s, "WWIVSYS")==0) {
  1026. +        wwivsys(0);
  1027. +    }
  1028. =    if ((strcmp(s,",")==0) && ((net_sysnum>0) || (net_num_max>1))) {
  1029. =      nl();
  1030. =      prt(2,get_string(23));
  1031. =      ch=onek("Q012");
  1032. =      switch(ch) {
  1033. =        case '0': print_local_file(get_string(1027),""); break;
  1034. =        case '1': print_local_file(get_string(1028),""); break;
  1035. =        case '2': print_local_file(get_string(1029),""); break;
  1036. =      }
  1037. =    }
  1038. =    if (strcmp(s,"/?")==0) {
  1039. =      printmenu(5);
  1040. =    }
  1041. =  }
  1042. =/*************************************************/
  1043.  
  1044. Lower in function dlmainmenu:
  1045.  
  1046. =    if ((strcmp(s,"DIREDIT")==0) || (strcmp(s,"DE")==0)) {
  1047. =      sysoplog(get_stringx(1,3));
  1048. +      wwivsys(DIREDIT);
  1049. =    }
  1050. =
  1051. =    if (strncmp(s,"DEBUG",5)==0) {
  1052.  
  1053. Load BBS.C and modify the following at the top of the file:
  1054.  
  1055. #define _DEFINE_GLOBALS_
  1056. =#include "vars.h"
  1057. =#include "subxtr.h"
  1058. =#include <math.h>
  1059. +#include "wwivsys.h"
  1060. =
  1061. =#ifdef __OS2__
  1062.  
  1063. Then, in function getcaller:
  1064.  
  1065. =        case 'B':
  1066. =          okskey=1;
  1067. =          if (ok_local()) {
  1068. =            write_inst(INST_LOC_BOARDEDIT,0,INST_FLAGS_NONE);
  1069. =            holdphone(1);
  1070. *            wwivsys(BOARDEDIT);
  1071. =            cleanup_net();
  1072. =            holdphone(0);
  1073. =          }
  1074. =          okskey=0;
  1075. =          break;
  1076. =        case 'C':
  1077. =          okskey=1;
  1078. =          if (ok_local()) {
  1079. =            write_inst(INST_LOC_CHAINEDIT,0,INST_FLAGS_NONE);
  1080. =            holdphone(1);
  1081. *            wwivsys(CHAINEDIT);
  1082. =            holdphone(0);
  1083. =          }
  1084. =          okskey=0;
  1085. =          break;
  1086. =        case 'D':
  1087. =          okskey=1;
  1088. =          if (ok_local()) {
  1089. =            write_inst(INST_LOC_DIREDIT,0,INST_FLAGS_NONE);
  1090. =            holdphone(1);
  1091. *            wwivsys(DIREDIT);
  1092. =            holdphone(0);
  1093. =          }
  1094. =          okskey=0;
  1095. =          break;
  1096. =        case 'W':
  1097. =          okskey=1;
  1098. =          if (ok_local()) {
  1099. =            write_inst(INST_LOC_TEDIT,0,INST_FLAGS_NONE);
  1100. =            holdphone(1);
  1101. =            text_edit();
  1102. =            holdphone(0);
  1103. =          }
  1104. =          okskey=0;
  1105. =          break;
  1106. =        case 'F':
  1107. =          if (ok_local()) {
  1108. =            write_inst(INST_LOC_DOS,0,INST_FLAGS_NONE);
  1109. =            holdphone(1);
  1110. =            nl();
  1111. =            pl(get_string(43));
  1112. =            nl();
  1113. =            setvect(save_dos,NULL);
  1114. =            do_remote(getenv("COMSPEC"),0);
  1115. =            setvect(save_dos, getvect(INT_REAL_DOS));
  1116. =            out1ch(12);
  1117. =            cleanup_net();
  1118. =            holdphone(0);
  1119. =          }
  1120. =          break;
  1121. =        case 'G':
  1122. =          okskey=1;
  1123. =          if (ok_local()) {
  1124. =            write_inst(INST_LOC_GFILEEDIT,0,INST_FLAGS_NONE);
  1125. =            holdphone(1);
  1126. *            wwivsys(GFILEEDITOR);
  1127. =            holdphone(0);
  1128. =          }
  1129. =          okskey=0;
  1130. =          break;
  1131. =        case 'I':
  1132. =          okskey=1;
  1133. =          if (ok_local()) {
  1134. =            write_inst(INST_LOC_VOTEEDIT,0,INST_FLAGS_NONE);
  1135. =            holdphone(1);
  1136. *            wwivsys(IVOTE);
  1137. =            holdphone(0);
  1138. =          }
  1139. =          okskey=0;
  1140. =          break;
  1141. =        case 'J':
  1142. =          if (ok_local()) {
  1143. =            holdphone(1);
  1144. =            edit_confs();
  1145. =            holdphone(0);
  1146. =          }
  1147. =          break;
  1148. =        case 'K':
  1149. =          if (ok_local()) {
  1150. =            usernum=1;
  1151. =            useron=1;
  1152. =            holdphone(1);
  1153. =            okskey=1;
  1154. =            prt(2,get_string(44));
  1155. =            input(s,50);
  1156. =            load_workspace(s,0);
  1157. =            send_email();
  1158. =            okskey=0;
  1159. =            useron=0;
  1160. =            write_user(1,&thisuser);
  1161. =            cleanup_net();
  1162. =            holdphone(0);
  1163. =          }
  1164. =          break;
  1165. =        case 'L':
  1166. =          if (ok_local()) {
  1167. =            read_status();
  1168. =            slname(date(), s);
  1169. =            print_local_file(s,status.log1);
  1170. =          }
  1171. =          break;
  1172. =        case 'M':
  1173. =          okskey=1;
  1174. =          if (ok_local()) {
  1175. =            write_inst(INST_LOC_MAILR,0,INST_FLAGS_NONE);
  1176. =            holdphone(1);
  1177. =            mailr();
  1178. =            holdphone(0);
  1179. =          }
  1180. =          okskey=0;
  1181. =          break;
  1182. =        case 'N':
  1183. =          if (ok_local())
  1184. =            print_local_file("NET.LOG","NETDAT*.LOG");
  1185. =          break;
  1186. =        case 'P':
  1187. =          if (ok_local())
  1188. =            print_pending_list();
  1189. =          break;
  1190. =        case 'Q':
  1191. =          end_bbs(QUIT_LEVEL);
  1192. =          break;
  1193. =        case 27:
  1194. =          outstr(get_string(1043));
  1195. =          if (yn())
  1196. =            end_bbs(QUIT_LEVEL);
  1197. =          clrscrb();
  1198. =          break;
  1199. =        case 'R':
  1200. =          if (ok_local()) {
  1201. =            usernum=1;
  1202. =            holdphone(1);
  1203. =            okskey=1;
  1204. =            readmail();
  1205. =            okskey=0;
  1206. =            write_user(1,&thisuser);
  1207. =            cleanup_net();
  1208. =            holdphone(0);
  1209. =          }
  1210. =          break;
  1211. =        case 'S':
  1212. =          if (ok_local()) {
  1213. =            prstatus();
  1214. =            getkey();
  1215. =          }
  1216. =          break;
  1217. =        case 'T':
  1218. =          if ((ok_local()) && (syscfg.terminal[0])) {
  1219. =            if (syscfg.sysconfig & sysconfig_shrink_term)
  1220. =              shrink_out(syscfg.terminal,0,0,0,1);
  1221. =            else
  1222. =              run_external(syscfg.terminal);
  1223. =            imodem(1);
  1224. =            imodem(0);
  1225. =          }
  1226. =          break;
  1227. =        case 'U':
  1228. =          okskey=1;
  1229. =          if (ok_local()) {
  1230. =            write_inst(INST_LOC_UEDIT,0,INST_FLAGS_NONE);
  1231. =            holdphone(1);
  1232. +            wwivsys(UEDIT);
  1233. =            holdphone(0);
  1234. =          }
  1235. =          okskey=0;
  1236. =          break;
  1237. =        case 'E':
  1238. =          if (ok_local()) {
  1239. =            usernum=1;
  1240. =            useron=1;
  1241. =            holdphone(1);
  1242. =            okskey=1;
  1243. =            send_email();
  1244. =            okskey=0;
  1245. =            useron=0;
  1246. =            write_user(1,&thisuser);
  1247. =            cleanup_net();
  1248. =            holdphone(0);
  1249. =          }
  1250. =          break;
  1251. =        case 'X':
  1252. =          for(i=0;i<50;i++) {
  1253. =            if(xenviron[i]!=NULL)
  1254. =              npr("\r\nxenv %d=%s",i,xenviron[i]);
  1255. =          }
  1256. =          npr("\r\nreal=%x, new=%x",INT_REAL_DOS,save_dos);
  1257. =          nl();
  1258. =          pausescr();
  1259. =        break;
  1260. =        case 'Y':
  1261. =          if (ok_local()) {
  1262. =            read_status();
  1263. =            slname(date(), s);
  1264. =            print_local_file(status.log1,s);
  1265. =          }
  1266. =          break;
  1267. =        case 'Z':
  1268. =          if (ok_local()) {
  1269. *            wwivsys(ZLOG);
  1270. =            nl();
  1271. =            getkey();
  1272. =          }
  1273. =          break;
  1274. =        case '/':
  1275. =          if ((net_sysnum) && (ok_local()))
  1276. =            force_callout(0);
  1277. =          break;
  1278. =        case '.':
  1279. =          if ((net_sysnum) && (ok_local()))
  1280. =            force_callout(1);
  1281. =          break;
  1282. =        case ',':
  1283. =          if ((net_sysnum>0) || (net_num_max>1) && ok_local()) {
  1284. =            nl();
  1285. =            prt(2,get_string(23));
  1286. =            ch=onek("Q012");
  1287. =            switch (ch) {
  1288. =              case '0':
  1289. =                print_local_file(get_string(1027),"");
  1290. =                break;
  1291. =              case '1':
  1292. =                print_local_file(get_string(1028),"");
  1293. =                break;
  1294. =              case '2':
  1295. =                print_local_file(get_string(1029),"");
  1296. =                break;
  1297. =            }
  1298. =          }
  1299. =          break;
  1300. =        case '`':
  1301. =          if ((net_sysnum) && (ok_local())) {
  1302. =            holdphone(1);
  1303. =            print_net_listing(1);
  1304. =            holdphone(0);
  1305. =          }
  1306. =          break;
  1307. =        case 9:
  1308. =          if (ok_local()) {
  1309. =            holdphone(1);
  1310. =            instance_edit();
  1311. =            holdphone(0);
  1312. =          }
  1313. =          break;
  1314. +        case '@':
  1315. +          if (ok_local()) {
  1316. +            holdphone(1);
  1317. +            wwivsys(0);
  1318. +            holdphone(0);
  1319. +          }
  1320. +          break;
  1321. =      }
  1322. =      if (!incom && !lokb) {
  1323.  
  1324. ───[Step 3]────────────────────────────────────────────────────────────────────
  1325.  
  1326. Load BBSOVL1.C and do the following addition:
  1327.  
  1328. =#include "vars.h"
  1329. =
  1330. =#pragma hdrstop
  1331. =
  1332. =#include "subxtr.h"
  1333. =
  1334. =#include "ripint.h"
  1335. +#include "wwivsys.h"
  1336. =
  1337. =#define FRAME 7
  1338.  
  1339.  
  1340. Same here, step A is if you keep internal functions, step B is if you wish to
  1341. remove them.
  1342.  
  1343.  
  1344. ───[Step 3a]───────────────────────────────────────────────────────────────────
  1345.  
  1346. Load BBSOVL1.C and replace function edit_confs:
  1347.  
  1348. void edit_confs(void)
  1349. {
  1350.   char ch;
  1351.  
  1352.   if (!checkpw())
  1353.     return;
  1354.  
  1355.   nln(2);
  1356.   pl(get_string(1023));
  1357.   nl();
  1358.   pl(get_string(1024));
  1359.   pl(get_string(1025));
  1360.   nl();
  1361.   outstr(get_string(1026));
  1362.   ch=onek("12Q");
  1363.   switch (ch) {
  1364.     case '1':
  1365.       if (incom)
  1366.         conf_edit(CONF_SUBS);
  1367.       else
  1368.         wwivsys(CONFBOARD);
  1369.       break;
  1370.     case '2':
  1371.       if (incom)
  1372.         conf_edit(CONF_DIRS);
  1373.       else
  1374.         wwivsys(CONFDIR);
  1375.       break;
  1376.     default:
  1377.       break;
  1378.   }
  1379. }
  1380.  
  1381. Save BBSOVL1.C
  1382.  
  1383. ───[Step 3b]───────────────────────────────────────────────────────────────────
  1384.  
  1385. Load BBSOVL1.C and replace function edit_confs:
  1386.  
  1387. void edit_confs(void)
  1388. {
  1389.   char ch;
  1390.  
  1391.   if (!checkpw())
  1392.     return;
  1393.  
  1394.   nln(2);
  1395.   pl(get_string(1023));
  1396.   nl();
  1397.   pl(get_string(1024));
  1398.   pl(get_string(1025));
  1399.   nl();
  1400.   outstr(get_string(1026));
  1401.   ch=onek("12Q");
  1402.   switch (ch) {
  1403.     case '1':
  1404.       wwivsys(CONFBOARD);
  1405.       break;
  1406.     case '2':
  1407.       wwivsys(CONFDIR);
  1408.       break;
  1409.     default:
  1410.       break;
  1411.   }
  1412. }
  1413.  
  1414. Save BBSOVL1.C
  1415.  
  1416. ───[Step 4]────────────────────────────────────────────────────────────────────
  1417.  
  1418. Load READMAIL.C
  1419.  
  1420. =#include "vars.h"
  1421. =
  1422. =#pragma hdrstop
  1423. =
  1424. +#include "wwivsys.h"
  1425.  
  1426. Same here, step A is if you keep internal functions, step B is if you wish to
  1427. remove them.
  1428.  
  1429. ───[Step 4a]───────────────────────────────────────────────────────────────────
  1430.  
  1431. Load READMAIL.C and edit function readmail:
  1432.  
  1433. =              valuser(m.fromuser);
  1434. *            else if (ch=='U') {
  1435. +              if (incom)
  1436. =                uedit(m.fromuser,0);
  1437. +              else
  1438. +                wwivsys(UEDIT);
  1439. *            } else {
  1440. +              if (incom)
  1441. =                uedit(m.fromuser,3);
  1442. +              else
  1443. +                wwivsys(UEDIT);
  1444. +            }
  1445. =          else if (cs()) {
  1446. =            nl();
  1447. =            pl(get_string(722));
  1448.  
  1449. Save READMAIL.C
  1450.  
  1451. ───[Step 4b]───────────────────────────────────────────────────────────────────
  1452.  
  1453. Load READMAIL.C and edit function readmail:
  1454.  
  1455. =              valuser(m.fromuser);
  1456. *            else if (ch=='U') {
  1457. +              wwivsys(UEDIT);
  1458. *            } else {
  1459. +              wwivsys(UEDIT);
  1460. +            }
  1461. =          else if (cs()) {
  1462. =            nl();
  1463. =            pl(get_string(722));
  1464.  
  1465. Save READMAIL.C
  1466.  
  1467. ───[Step 5]────────────────────────────────────────────────────────────────────
  1468.  
  1469. If you have selected to remove internal function, here is a list of the
  1470. functions you can now delete. Simply search for those functions and delete
  1471. them entirely. DO NOT remove the other functions in the file, if there is no
  1472. more functions in the C file, you can remove it from the makefile if you wish.
  1473.  
  1474. /* File: SUBEDIT.C */
  1475.  
  1476. void boarddata(int n, char *s);
  1477. void showsubs(void);
  1478. void modify_sub(int n);
  1479. void swap_subs(int sub1, int sub2);
  1480. void insert_sub(int n);
  1481. void delete_sub(int n);
  1482. void boardedit(void);
  1483.  
  1484. /* File: CHNEDIT.C */
  1485.  
  1486. void chaindata(int n, char *s);
  1487. void showchains(void);
  1488. void modify_chain(int n);
  1489. void insert_chain(int n);
  1490. void delete_chain(int n);
  1491. void chainedit(void);
  1492.  
  1493. /* File: DIREDIT.C */
  1494.  
  1495. void dirdata(int n, char *s);
  1496. void showdirs(void);
  1497. void modify_dir(int n);
  1498. void swap_dirs(int dir1, int dir2);
  1499. void insert_dir(int n);
  1500. void delete_dir(int n);
  1501. void dlboardedit(void);
  1502.  
  1503.  
  1504. /* File: GFLEDIT.C */
  1505.  
  1506. void gfiledata(int n, char *s);
  1507. void showsec(void);
  1508. int exist_dir(char *s);
  1509. void modify_sec(int n);
  1510. void insert_sec(int n);
  1511. void delete_sec(int n);
  1512. void gfileedit(void);
  1513.  
  1514.  
  1515. /* File: VOTEEDIT.C */
  1516.  
  1517. void print_quests(void);
  1518. void set_question(int ii);
  1519. void ivotes(void);
  1520.  
  1521. /* File: UEDIT.C */
  1522.  
  1523. void print_data(int un, userrec *u, int lng, int cls);
  1524. int matchuser(int un);
  1525. int match_user(userrec *u);
  1526. void changeopt(void);
  1527. void uedit(int usern, int other);
  1528.  
  1529.  
  1530. /* File: SYSOPF.C */
  1531.  
  1532. void zlog(void);
  1533.  
  1534. ───[Step 6]────────────────────────────────────────────────────────────────────
  1535.  
  1536. Copy WWIVSYS.H in your source directory
  1537.  
  1538. ───[Step 7]────────────────────────────────────────────────────────────────────
  1539.  
  1540. PULLDOWN MENU ENTRY
  1541.  
  1542. Load BBS.C and do the following change to function getcaller:
  1543.  
  1544. =      wfc=1;
  1545. =    }
  1546. =    okskey=0;
  1547. *    ch=upcase(getch());
  1548. =    if (ch) {
  1549. =      wfc=2;
  1550. =      any=1;
  1551. =      switch(ch) {
  1552. +        case 59:
  1553. +          pulldown_menu();
  1554. +          break;
  1555. =        case '=':
  1556. =          if (ok_local()) {
  1557. =            holdphone(1);
  1558. =            reset_files();
  1559.  
  1560. ───[Step 8]────────────────────────────────────────────────────────────────────
  1561.  
  1562. Load CONIO.C and do this small change in function skey:
  1563.  
  1564. =        set_autoval(ch-104);
  1565. =      } else {
  1566. =        switch ((unsigned char) ch) {
  1567. =          case 59: /* F1 */
  1568. +            if (exist("SYS.EXE"))
  1569. +              pulldown_menu();
  1570. +            else
  1571. =              val_cur_user();
  1572. =            break;
  1573. =          case 60: /* F2 */
  1574.  
  1575. ───[Step 9]────────────────────────────────────────────────────────────────────
  1576.  
  1577. Load BBSOVL2.C and copy the following functions at the end of the file:
  1578.  
  1579. #include "wwivsys.h"
  1580.  
  1581. void menu_item(int which, int select, int lgt)
  1582. {
  1583.   char s[80],s1[80],s2[80];
  1584.  
  1585.   curatr=select ? 0x3f : 0x1f;
  1586.   switch(which)
  1587.   {
  1588.     case 0:
  1589.       movecsr(4,1);
  1590.       strcpy(s,"Editors");
  1591.       break;
  1592.     case 1:
  1593.       movecsr(27,1);
  1594.       strcpy(s,"Utilities");
  1595.       break;
  1596.     case 2:
  1597.       movecsr(48,1);
  1598.       strcpy(s,"System Info");
  1599.       break;
  1600.     case 3:
  1601.       movecsr(4,4);
  1602.       strcpy(s,wfc?"Tetrix":"Online Editor");
  1603.       break;
  1604.     case 4:
  1605.       movecsr(4,5);
  1606.       strcpy(s,"Board Editor");
  1607.       break;
  1608.     case 5:
  1609.       movecsr(4,6);
  1610.       strcpy(s,"Dir Editor");
  1611.       break;
  1612.     case 6:
  1613.       movecsr(4,7);
  1614.       strcpy(s,"Door Editor");
  1615.       break;
  1616.     case 7:
  1617.       movecsr(4,8);
  1618.       strcpy(s,"Gfile Editor");
  1619.       break;
  1620.     case 8:
  1621.       movecsr(4,9);
  1622.       strcpy(s,"SubConf Editor");
  1623.       break;
  1624.     case 9:
  1625.       movecsr(4,10);
  1626.       strcpy(s,"DirConf Editor");
  1627.       break;
  1628.     case 10:
  1629.       movecsr(4,11);
  1630.       strcpy(s,"User Editor");
  1631.       break;
  1632.     case 11:
  1633.       movecsr(4,12);
  1634.       strcpy(s,"INI Switches");
  1635.       break;
  1636.     case 12:
  1637.       movecsr(4,13);
  1638.       strcpy(s,"INI Editor");
  1639.       break;
  1640.     case 13:
  1641.       movecsr(4,14);
  1642.       strcpy(s,wfc?"Who's Online":"Show User Info");
  1643.       break;
  1644.     case 20:
  1645.       movecsr(27,4);
  1646.       strcpy(s,"String Editor");
  1647.       break;
  1648.     case 21:
  1649.       movecsr(27,5);
  1650.       strcpy(s,"SubList Selector");
  1651.       break;
  1652.     case 22:
  1653.       movecsr(27,6);
  1654.       strcpy(s,"SSM Editor");
  1655.       break;
  1656.     case 23:
  1657.       movecsr(27,7);
  1658.       strcpy(s,"Network Editor");
  1659.       break;
  1660.     case 24:
  1661.       movecsr(27,8);
  1662.       strcpy(s,"CALLOUT.NET Editor");
  1663.       break;
  1664.     case 25:
  1665.       movecsr(27,9);
  1666.       strcpy(s,"Vote Editor");
  1667.       break;
  1668.     case 26:
  1669.       movecsr(27,10);
  1670.       strcpy(s,"Backup");
  1671.       break;
  1672.     case 40:
  1673.       movecsr(47,4);
  1674.       strcpy(s,"Acitivity Log");
  1675.       break;
  1676.     case 41:
  1677.       movecsr(47,5);
  1678.       strcpy(s,"Statistics");
  1679.       break;
  1680.     case 42:
  1681.       movecsr(47,6);
  1682.       strcpy(s,"BBS Informations");
  1683.       break;
  1684.     case 43:
  1685.       movecsr(47,7);
  1686.       strcpy(s,"WWIVsys Config");
  1687.       break;
  1688.     case 44:
  1689.       movecsr(47,8);
  1690.       strcpy(s,"WWIVsys Main Menu");
  1691.       break;
  1692.   }
  1693.   sprintf(s1,lgt ? " %%-%ds" : " %%s " ,lgt);
  1694.   sprintf(s2,s1,s);
  1695.   outfast(s2);
  1696. }
  1697.  
  1698. void prst(char *stat, char *val,char *stat2, char *val2)
  1699. {
  1700.   char s[80];
  1701.  
  1702.   sprintf(s,"%-13s: ",stat);
  1703.   outfast(s);
  1704.   curatr--;
  1705.   outfast(val);
  1706.   curatr++;
  1707.   movecsr(55,WhereY());
  1708.   sprintf(s,"%-11s: ",stat2);
  1709.   outfast(s);
  1710.   curatr--;
  1711.   outfast(val2);
  1712.   curatr++;
  1713.   movecsr(8,WhereY()+1);
  1714. }
  1715.  
  1716. void user_stats(void)
  1717. {
  1718.   char s[81],ar[17],dar[17],restrict[17],rst[17];
  1719.   int i;
  1720.  
  1721.   strcpy(rst,restrict_string);
  1722.   for (i=0; i<=15; i++) {
  1723.     if (thisuser.ar & (1 << i))
  1724.       ar[i]='A'+i;
  1725.     else
  1726.       ar[i]=32;
  1727.     if (thisuser.dar & (1 << i))
  1728.       dar[i]='A'+i;
  1729.     else
  1730.       dar[i]=32;
  1731.     if (thisuser.restrict & (1 << i))
  1732.       restrict[i]=rst[i];
  1733.     else
  1734.       restrict[i]=32;
  1735.   }
  1736.   dar[16]=0;
  1737.   ar[16]=0;
  1738.   restrict[16]=0;
  1739.  
  1740.   makewindow(6,8,72,12);
  1741.   movecsr(8,9);
  1742.   prst("User Handle",thisuser.name,"User Lev",itoa(thisuser.sl,s,10));
  1743.   prst("Real Name",thisuser.realname,"Xfer Lev",itoa(thisuser.dsl,s,10));
  1744.   prst("Phone",thisuser.phone,"Uploaded",itoa(thisuser.uploaded,s,10));
  1745.   prst("Computer",ctypes[thisuser.comp_type],"Upload K",ltoa(thisuser.uk,s,10));
  1746.   prst("Password",thisuser.pw,"Downloaded",itoa(thisuser.downloaded,s,10));
  1747.   prst("ARs",ar,"Download K",ltoa(thisuser.dk,s,10));
  1748.   prst("DARs",dar,"User Gold",itoa(thisuser.gold,s,10));
  1749.   prst("Restriction",restrict,"Msg Read",ltoa(thisuser.msgread,s,10));
  1750.   prst("Last on",thisuser.laston,"Msg Posted",
  1751.               ltoa(thisuser.msgpost+thisuser.postnet,s,10));
  1752.   outfast("User Note    : ");
  1753.   curatr--;
  1754.   outfast(thisuser.note);
  1755.   curatr++;
  1756.   getchd();
  1757. }
  1758.  
  1759. char action(int acton)
  1760. {
  1761.   char exitm;
  1762.   char far *oldscr;
  1763.  
  1764.   oldscr=farmalloc(screenlen);
  1765.  
  1766.   _setcursortype(_NORMALCURSOR);
  1767.   exitm=0;
  1768.   memmove(oldscr,scrn,screenlen);
  1769.   curatr=0x4f;
  1770.   switch(acton)
  1771.   {
  1772.     case 3:
  1773.       if (wfc)
  1774.       {
  1775.         curatr=0x07;
  1776.         extern_prog("TETRIX", EFLAG_SHRINK|EFLAG_INTERNAL);
  1777.         curatr=0x4f;
  1778.       }
  1779.       else
  1780.         val_cur_user();
  1781.     break;
  1782.     case 4: wwivsys(BOARDEDIT); break;
  1783.     case 5: wwivsys(DIREDIT); break;
  1784.     case 6: wwivsys(CHAINEDIT); break;
  1785.     case 7: wwivsys(GFILEEDIT); break;
  1786.     case 8: wwivsys(CONFBOARD); break;
  1787.     case 9: wwivsys(CONFDIR); break;
  1788.     case 10: wwivsys(UEDIT); break;
  1789.     case 11: wwivsys(INISWITCH); break;
  1790.     case 12: wwivsys(INIEDITOR); break;
  1791.     case 13:
  1792.       if (wfc)
  1793.         wwivsys(WHO);
  1794.       else
  1795.         user_stats();
  1796.     break;
  1797.     case 20: wwivsys(STRINGEDIT); break;
  1798.     case 21: wwivsys(SUBLIST); break;
  1799.     case 22: wwivsys(SSMEDITOR); break;
  1800.     case 23: wwivsys(NETEDITOR); break;
  1801.     case 24: wwivsys(CALLOUT); break;
  1802.     case 25: wwivsys(IVOTE); break;
  1803.     case 26: wwivsys(BACKUP); break;
  1804.     case 40: wwivsys(ZLOG); break;
  1805.     case 41: wwivsys(STATISTICS); break;
  1806.     case 42: wwivsys(BBSINFO); break;
  1807.     case 43: wwivsys(CONFIG); break;
  1808.     case 44: wwivsys(0); break;
  1809.   }
  1810.  
  1811.   _setcursortype(_NOCURSOR);
  1812.   if (!exitm)
  1813.     memmove(scrn,oldscr,screenlen);
  1814.   farfree(oldscr);
  1815.   return(exitm);
  1816. }
  1817.  
  1818.  
  1819. char domenu(int *returncode,int lo,int numop, int mnus, int mnulen)
  1820. {
  1821.   int i,ch,pos,opos,done;
  1822.   char far *oldscr,rc;
  1823.  
  1824.   oldscr=farmalloc(screenlen);
  1825.  
  1826.   _setcursortype(_NOCURSOR);
  1827.  
  1828.   memmove(oldscr,scrn,screenlen);
  1829.   makewindow(mnus,3,mnulen,numop+3);
  1830.   for(i=lo;i<numop+lo+1;i++)
  1831.     menu_item(i,0,0);
  1832.   pos=0;
  1833.   done=0;
  1834.   rc=0;
  1835.   do {
  1836.     opos=pos+lo;
  1837.     menu_item(opos,1,mnulen-3);
  1838.     ch=getchd();
  1839.     
  1840.     if (ch==0)
  1841.     {
  1842.       ch=getchd();
  1843.       switch (ch)
  1844.       {
  1845.         case 59:
  1846.           done=1;
  1847.           *returncode=4;
  1848.          break;
  1849.          case 71: pos=0; break;
  1850.          case 79: pos=numop; break;
  1851.          case 80:
  1852.            if (pos<numop)
  1853.              pos++;
  1854.             else
  1855.              pos=0;
  1856.          break;
  1857.          case 72:
  1858.            if (pos>0)
  1859.              pos--;
  1860.            else
  1861.              pos=numop;
  1862.          break;
  1863.          case 75:
  1864.          case 15:
  1865.            done=1;
  1866.            *returncode=*returncode-1;
  1867.            if (*returncode<0)
  1868.              *returncode=2;
  1869.          break;
  1870.          case 77:
  1871.            done=1;
  1872.            *returncode=*returncode+1;
  1873.            if (*returncode>2)
  1874.              *returncode=0;
  1875.          break;
  1876.       }
  1877.     } else {
  1878.       switch(ch)
  1879.       {
  1880.         case 27:
  1881.           done=1;
  1882.           *returncode=4;
  1883.         break;
  1884.         case 13:
  1885.           rc=action(pos+lo);
  1886.           if (rc) {
  1887.             *returncode=4;
  1888.             done=1;
  1889.           }
  1890.         break;
  1891.       }
  1892.     }
  1893.     menu_item(opos,0,mnulen-3);
  1894.   } while (!done);
  1895.  
  1896.   memmove(scrn,oldscr,screenlen);
  1897.   farfree(oldscr);
  1898.   _setcursortype(_NORMALCURSOR);
  1899.   return(rc);
  1900. }
  1901.  
  1902.  
  1903.  
  1904.  
  1905. void pulldown_menu(void)
  1906. {
  1907.   int cp, done, i, tl;
  1908.  
  1909.   pr_Wait(1);
  1910.   tl=topline;
  1911.   topline=0;
  1912.   savescreen(&screensave);
  1913.   curatr=0x1f;
  1914.   makewindow(0,0,79,3);
  1915.   for(i=0;i<3;i++)
  1916.     menu_item(i,0,0);
  1917.   cp=0;
  1918.   done=0;
  1919.   while (!done) {
  1920.     i=curatr;
  1921.     if (cp<4)
  1922.       menu_item(cp,1,0);
  1923.     curatr=i;
  1924.     i=cp;
  1925.     switch(cp) {
  1926.     case 0: domenu(&cp,3,10,3,18); break;
  1927.     case 1: domenu(&cp,20,6,26,24); break;
  1928.     case 2: domenu(&cp,40,4,46,28); break;
  1929.     case 3:
  1930.       out1ch(7);
  1931.       cp=1;
  1932.       break;
  1933.     case 4:
  1934.       done=1;
  1935.       break;
  1936.     }
  1937.     menu_item(i,0,0);
  1938.   }
  1939.   restorescreen(&screensave);
  1940.   topline=tl;
  1941.   if (wfc)
  1942.     clrscr();
  1943.   else
  1944.     changedsl();
  1945.   pr_Wait(0);
  1946. }
  1947.  
  1948. ───[Step 10]───────────────────────────────────────────────────────────────────
  1949.  
  1950. That's it, simply do a MAKE FCNS and recompile the entire system.
  1951.  
  1952. We recommand that you change the color of the F1 color in WWIV.INI to something
  1953. else, you'll see why.
  1954.  
  1955. To use WWIVsys command internally, it is quite simple, simply use:
  1956.  
  1957.                            wwivsys(CODENAME);
  1958.  
  1959. The list of the code names is available in WWIVSYS.H or by doing SYS -?.
  1960. Custumize them as you wish.
  1961.  
  1962. To activate Pulldown menus, press F1 either at WFC or either when a user is
  1963. on, if WWIVsys is not present, you will have the normal F1 menu, the menu
  1964. is a bit different at WFC, where you can load Tetrix (if present) and use the
  1965. Instance Monitor function (WWIVsys v1.6 and later).
  1966.  
  1967. French Proverb: La fortune vient en dormant.
  1968.  
  1969. For comments, bug report and suggestion, e-mail at the following address:
  1970.  
  1971. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  1972.                  -> spotnick@gamemaster.qc.ca
  1973. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  1974.                  -> martin.bourdages@radio.magicnet.com
  1975.  
  1976.                  =>   French Mod Division Support Sub   <=
  1977.                                 SubType: FMD
  1978.                            Host: @20302 (WWIVnet)
  1979.                       Scan sublist for other networks
  1980.  
  1981.         Read PRODUCTS.FMD for the full list of our support systems.
  1982.  
  1983. ───[EOF]──────────────────────────────────────────────────────────────────────
  1984.