home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / FMD-20A.ZIP / FMD-20A.MOD < prev    next >
Encoding:
Text File  |  1995-06-01  |  13.1 KB  |  398 lines

  1.  
  2.    ┌┬─── ──  ─   ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  3.    ││                    Alternative Worlds Presents                      │
  4.    └┼─────────────────────────────────────────────────────────────────────┐
  5.    ││ Mod Name       » FMD-20a.MOD                                        │∙
  6.    ││ Difficulty     » █▒▒▒▒▒▒▒▒▒▒ (1/10)                                 │:
  7.    ││ WWIV Version   » 4.24                                               ││
  8.    ││ Date Affected  » 06/01/95                                           ││
  9.    :│ Files Affected » MISCCMD.C / MMENU.C                                ││
  10.    ∙│ Description    » True Pulldown Matrix Log-Off                       ││
  11.     └─────────────────────────────────────────────────────────────────────┼┐
  12.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  13. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─   ─  ── ───└┘
  14.  
  15.  ┌┬══════════════════┐
  16.  ││ Long Description ││
  17.   └══════════════════┴┘
  18.  
  19.   This modification will replace your normal logoff with a log off menu that
  20. uses the arrow keys. You will have many options in that menu and it will have
  21. a nice design.
  22.  
  23.  
  24. Here's what it looks like:
  25.  
  26. D
  27. CL o g   O f f   M a t r i x
  28. C┌·┐ ┌·┐ ·  ──────·┐C·─────┐  ┌·┐ ┌·┐ ·
  29.   ───:::::───────────────────FMD────────────── :──────:─ :::::──
  30. C· ·┘ └·┘  ·C·───────────────────────────────·┘C·  · ·┘ └·
  31. C┌·───────────────────────────────────·┐
  32. C|               Log Off              C|
  33. C|CTime BankC|
  34. C:CFeedback To SysopC:
  35. C·CMessage To Next UserC·
  36. C:CBBS ListC:
  37. C|CPage SysOpC|
  38. C|CQuit Back To SystemC|
  39. C└·───────────────────────────────────·┘
  40. C┌·┐ ┌·┐ ·  ──────·┐C·─────┐  ┌·┐ ┌·┐ ·
  41.   ───:::::─────────────AlternativeWorlds─────── :──────:─ :::::──
  42. C· ·┘ └·┘  ·C·───────────────────────────────·┘C·  · ·┘ └·
  43. D0
  44.  
  45.  
  46.   It is only available to ANSI users of course, Ascii users will have a kind-of
  47. same thing, they'll be asked if they wish to leave a feedback and a message to
  48. next user.
  49.  
  50.   A feature is added, you can select if you want or not your users to be asked
  51. on their 3 first logons if they wish to keep their account of not, VERY useful
  52. I think, so I included it.
  53.  
  54.  ┌┬══════════════════┐
  55.  ││   Requirements   ││
  56.   └══════════════════┴┘
  57.  
  58. This modification >NEEDS< COMMON from the Asylum Mod Group installed in your
  59. source. It should be included in this archive. You need to have v2.2 or higher
  60. installed else it won't work.
  61.  
  62. Not required, but highly suggested:
  63.  
  64. FMD-09.MOD (To help the chat request at matrix)
  65. FMD-14.MOD (Pulldown Matrix Logon)
  66.  
  67.  ┌┬══════════════════┐
  68.  ││     Thanks       ││
  69.   └══════════════════┴┘
  70.  
  71.   ■ Zu Digital & Sam for their COMMON modification that was used for the
  72.     arrow keys in this modification.
  73.   ■ Unca Scrooge & Zu Digital for modeling this mod from the logon matrix.
  74.   ■ All users from Alternative Worlds for their testing.
  75.  
  76. Revision A:
  77.  
  78.  - Updated for WWIV v4.24
  79.  - Using Internal WWIV.INI functions
  80.  - Now can use random matrix screens.
  81.  
  82.  ┌┬═══════┐
  83.  ││ Tests ││
  84.   └═══════┴┘
  85.  
  86.   This modification has been tested on a virgin WWIV v4.24 source using
  87.   Borland C++ v4.5
  88.  
  89. ──────────────────────────────────────────────────────────────────────────────
  90.                                    Legend
  91.                           ╔═══╤══════════════════┐
  92.                           │ + │ Add This Line    │
  93.                           │ - │ Delete This Line │
  94.                           │ * │ Modify This Line │
  95.                           │ = │ Existing Line    │
  96.                           └═══╧══════════════════╝
  97. ───[Step 1]────────────────────────────────────────────────────────────────────
  98.  
  99.   Load MISCCMD.C and dump the following functions at the end of the file:
  100.  
  101. #include <conio.h>
  102.  
  103. void call_again(void)
  104. {
  105.   char tb[81],s[81];
  106.  
  107.   if (thisuser.logons<3) {
  108.     nln(2);
  109.     existprint("CALLAGAN");
  110.     nl();
  111.     npr("9Do you wish to keep your account on 1%s9? ",syscfg.systemname);
  112.     if (ny()) {
  113.       pl("Good! See you at next session!");
  114.     } else {
  115.       prt(9,"Reason: ");
  116.       mpl(60);
  117.       inputl(s,60);
  118.       sysoplog(s);
  119.       prt(9,"Well, maybe we will see you another day, you no longer exist on this system.");
  120.       deluser(usernum);
  121.       sprintf(tb,"%s chose to delete his account.",nam(&thisuser,usernum));
  122.       sysoplog(tb);
  123.       ssm(1,0,tb);
  124.     }
  125.   }
  126. }
  127.  
  128.  
  129. char *matrix2_str [] = {
  130.   "Log Off",
  131.   "Time Bank",
  132.   "Feedback To Sysop",
  133.   "Message To Next User",
  134.   "BBS List",
  135.   "Page SysOp",
  136.   "Quit Back To System"
  137. };
  138.  
  139. #define MATRIX2_OPTIONS  7
  140.  
  141. void logoff_matrix(void)
  142. {
  143.   int i, done, ch, cl;
  144.   char *ss;
  145.   showtextrec opt[MATRIX2_OPTIONS];
  146.   varimenurec *menu=NULL, newmenu;
  147.   varimenuinfo info={0, 0, 0, 0,
  148.                      DARKGRAY+(BLUE<<4),
  149.                      COMMON_FULL, 0, 0, 0, 0, 0};
  150.  
  151.   if (ini_init("WWIV.INI", "LOGOFF_MATRIX", NULL)==0)
  152.   {
  153.     if ((ss=ini_get("COLOR_HIGH", -1, NULL))!=NULL)
  154.       ch=atoi(ss);
  155.     if ((ss=ini_get("COLOR_LOW", -1, NULL))!=NULL)
  156.       cl=atoi(ss);
  157.     ini_done();
  158.   }
  159.  
  160.   info.mi_normal=cl;
  161.   info.mi_hi=ch;
  162.   info.ci_normal=ch;
  163.   info.ci_hi=cl;
  164.  
  165.   for (i=0; i<MATRIX2_OPTIONS; i++)
  166.   {
  167.     build_showtextrec(&opt[i], 25, 7+i, 35, matrix2_str[i], JUSTIFY_CENTER, ' ');
  168.     fillvarimenurec(&newmenu, &opt[i], SHOW_TEXT_TYPE, matrix2_str[i][0],
  169.     matrix2_str[i][0], COMMON_ACTIVE);
  170.     menu=addvarimenu(menu, &newmenu);
  171.   }
  172.  
  173.   done=0;
  174.   topdata=0;
  175.  
  176.   while((!done) && (!hangup))
  177.   {
  178.     outchr(12);
  179.     _setcursortype(_NOCURSOR);
  180.     if (ini_init("WWIV.INI", "LOGOFF_MATRIX", NULL)==0)
  181.     {
  182.       if ((ss=ini_get("RANDOM_MATRIX", -1, NULL))!=NULL)
  183.       {
  184.         if (ss[0]==*str_yes)
  185.           random_screen("MATRIX2");
  186.         else
  187.           existprint("MATRIX2");
  188.       }
  189.       ini_done();
  190.     }
  191.     info.redraw=COMMON_FULL;
  192.     varimenu(menu, &info);
  193.     _setcursortype(_NORMALCURSOR);
  194.     do_sysop_command(info.event);
  195.     _setcursortype(_NOCURSOR);
  196.  
  197.     switch(info.event)
  198.     {
  199.       case EXECUTE:
  200.         _setcursortype(_NORMALCURSOR);
  201.         switch(info.returnvalue)
  202.         {
  203.           case 'T':
  204.             time_bank();
  205.           break;
  206.           case 'P':
  207.             nln(8);
  208.             reqchat();
  209.             pausescr();
  210.           break;
  211.           case 'F':
  212.             nln(9);
  213.             feedback(0);
  214.           break;
  215.           case 'Q':
  216.             done=1;
  217.             outchr(12);
  218.           break;
  219.           case 'L':
  220.             done=1;
  221.             outchr(12);
  222.             if (ini_init("WWIV.INI", "LOGOFF_MATRIX", NULL)==0)
  223.             {
  224.               if ((ss=ini_get("CALL_AGAIN", -1, NULL))!=NULL)
  225.               {
  226.                 if (ss[0]=='Y')
  227.                   call_again();
  228.               }
  229.               ini_done();
  230.             }
  231.             outchr(12);
  232.             outstr(get_string(29));
  233.             pl(ctim(timer()-timeon));
  234.             existprint(get_string(1036));
  235.             hangup=1;
  236.           break;
  237.           case 'M':
  238.             nln(9);
  239.             write_automessage();
  240.           break;
  241.           case 'B':
  242.             nln(9);
  243.             bbslist();
  244.           break;
  245.         }
  246.       break;
  247.       case GET_OUT:
  248.         _setcursortype(_NORMALCURSOR);
  249.         outchr(12);
  250.         done=1;
  251.       break;
  252.     }
  253.   }
  254.   killvarimenu(menu);
  255. }
  256.  
  257.  
  258. ───[Step 2]────────────────────────────────────────────────────────────────────
  259.  
  260. Load MMENU.C and replace the 2 "case 'O':" by this:
  261.  
  262.       case 'O':
  263.         if (okansi()) {
  264.           write_inst(INST_LOC_LOGOFF,0,INST_FLAGS_ONLINE);
  265.           logoff_matrix();
  266.         } else {
  267.         nl();
  268.         nl();
  269.         prt(9,get_string(28));
  270.         helpl=12;
  271.         if (yn()) {
  272.           if (ini_init("WWIV.INI", "LOGOFF_MATRIX", NULL)==0)
  273.           {
  274.             if ((s=ini_get("CALL_AGAIN", -1, NULL))!=NULL)
  275.             {
  276.               if (s[0]=='Y')
  277.                 call_again();
  278.             }
  279.             ini_done();
  280.           }
  281.           prt(9,"Leave a message to the sysop?");
  282.           strcpy(irt,"Logoff Feedback");
  283.           if (yn())
  284.             feedback(2);
  285.           prt(9,"Leave a message to next user?");
  286.           if (yn())
  287.             write_automessage();
  288.           write_inst(INST_LOC_LOGOFF,0,INST_FLAGS_ONLINE);
  289.           outchr(12);
  290.           if (rip_on())
  291.             random_screen("goodbye");
  292.           outstr(get_string(29));
  293.           pl(ctim(timer()-timeon));
  294. #ifdef RIPDRIVE
  295.           rd_coff();
  296. #endif
  297.           existprint(get_string(1036));
  298.           hangup=1;
  299.          }
  300.         }
  301.         break;
  302.  
  303.  
  304. ───[Step 3]────────────────────────────────────────────────────────────────────
  305.  
  306. Load WWIV.INI, create a [LOGOFF_MATRIX] sub section and add the following
  307. lines:
  308.  
  309. [LOGOFF_MATRIX]
  310. ; Color of Highlighted item in scroll menu.
  311. COLOR_HIGH    = 31
  312. ; Color of other items in scroll menu.
  313. COLOR_LOW     = 1
  314. ; Ask users with less than 3 logs if they want to keep their account
  315. CALL_AGAIN    = YES
  316. ; Allow to use various ANSI matrix screen, like WELCOME.*
  317. RANDOM_MATRIX = NO
  318.   
  319. ───[Step 4]────────────────────────────────────────────────────────────────────
  320.  
  321. HOW TO ADD OPTIONS: (From the logon matrix, this is similar)
  322.  
  323.   You will have to know how to mod of course, but with this new version of
  324. the logon matrix, it is VERY easy to add new options.
  325.  
  326. In LILO.C, you have:
  327.  
  328. #define MATRIX_OPTIONS  7              // Amount of options in the matrix.
  329.  
  330. You have to change the number, increasing or discreasing when you add or
  331. remove an option. This is absolutely needed. Then
  332.  
  333. char *matrix_str [] = {
  334.     "Log On The BBS",
  335.     "Apply For Access",
  336.     "Check For Validation",
  337.     "Feedback To The Sysop",
  338.     "Page Sysop",
  339.     "Read Your Mail",
  340.     "Quit Now",     <--- Add a COMMA here
  341.     "This is your new option"  <--- Your new option
  342. };
  343.  
  344. You can put your new option whereever you want it, but be sure the last label
  345. doesn't have a comma, all others should have one. BE SURE that the first line
  346. of the option is UNIQUE, because the matrix will use that letter as the hot
  347. key needed to run the matrix.
  348.  
  349. That's it! Then you simply have to add a case there:
  350.  
  351.       case EXECUTE:
  352.         _setcursortype(_NORMALCURSOR);
  353.         switch(info.returnvalue)
  354.         {
  355.           case 'x':  <-- x is the 1st letter of your option (Hotkey)
  356.           /*
  357.            * Add your function here.
  358.            */
  359.           break;
  360.           case 'L':
  361.             do
  362.             {
  363.  
  364. And you're done! Nothing is more easy.
  365.  
  366. ───[Step 5]────────────────────────────────────────────────────────────────────
  367.  
  368. Now you need to do a MAKE FCNS to have this function working okay, and then
  369. you just run this new BBS and enjoy your pulldown matrix logoff menu.
  370.  
  371. Copy the file FMD.INI in your main WWIV directory, and copy MATRIX2.ANS in
  372. your GFILE directory. Feel free to modify it like you want it. Place also the
  373. file CALLAGAN.MSG in your GFILES directory and edit it for your needs.
  374.  
  375. If you want to enable the RANDOM_MATRIX option, you need to do your own
  376. ANSI screen because we don't have any extra for the moment. Simply label them
  377. as MATRIX2.ANS, MATRIX2.0, MATRIX2.1, ... and place them in your language #1's
  378. directory (this is generally your gfiles directory)
  379.  
  380.  
  381. French Proverb: A l'impossible, nul n'est tenu.
  382.  
  383. For comments, bug report and suggestion, e-mail at the following address:
  384.  
  385. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  386.                  -> spotnick@gamemaster.qc.ca
  387. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  388.                  -> martin.bourdages@radio.magicnet.com
  389.  
  390.                  =>   French Mod Division Support Sub   <=
  391.                                 SubType: FMD
  392.                            Host: @20302 (WWIVnet)
  393.                       Scan sublist for other networks
  394.  
  395.         Read PRODUCTS.FMD for the full list of our support systems.
  396.  
  397. ───[EOF]──────────────────────────────────────────────────────────────────────
  398.