home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / FMD-32B.ZIP / FMD-32B.MOD < prev   
Encoding:
Text File  |  1995-06-22  |  31.4 KB  |  1,122 lines

  1. Nicolas Leblanc #2 @20302
  2. Sat Jun 10 13:06:01 1995
  3.    ┌┬─── ──  ─   ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  4.    ││                    Alternative Worlds Presents                      │
  5.    └┼─────────────────────────────────────────────────────────────────────┐
  6.    ││ Mod Name       » FMD-32b.MOD                                        │∙
  7.    ││ Difficulty     » ████▒▒▒▒▒▒▒ (4/10)                                 │:
  8.    ││ WWIV Version   » 4.24                                               ││
  9.    ││ Date Affected  » 06/01/95                                           ││
  10.    :│ Files Affected » MMENU.C / MISCCMD.C / LILO.C / COM.C / UEDIT.C     ││
  11.    ∙│                  NEWUSER.C / VARDEC.H                               ││
  12.    ∙│ Description    » Registeries of Users For WWIV                      ││
  13.     └─────────────────────────────────────────────────────────────────────┼┐
  14.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  15. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─   ─  ── ───└┘
  16.  
  17.  
  18.  ┌┬══════════════════┐
  19.  ││ Long Description ││
  20.   └══════════════════┴┘
  21.  
  22.    This is the real thing, a real user registry just like Major BBS, easy
  23. to install, and very easy to use!
  24.  
  25.    The registry will look like that:
  26.  
  27. ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  28.  ∙                   Digital Republic On-Line User Lookup                   ∙ 
  29. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  30. Real Name:  Nicolas LeBlanc  SexM  Age21   AliasesSpotnick
  31. Makes a Living as Student
  32. Sexual Orientation is: Straight
  33. Future Goals in LifeBe Rich!
  34. Favorite Kind of Food: Italian
  35. Favorite TV Show(s)Beverly Hills, 90210
  36. Favorite Movie: Dead Poets Society  Watches MoviesToo Often
  37. Favorite ActorEthan Hawke  Favorite Actress: Winona Ryder
  38. Place I'd Like to Live inCalifornia
  39. Favorite Vacation SpotFlorida
  40. Drinking HabitsI'm A Social Drinker
  41. Favorite MusicAlternative
  42. Favorite ActivitySex!
  43. Opinion on DrugsNo Way
  44. Ideal DateAnyhow
  45. Financial StatusBelow The Red Line (Send WWIVsys Reg!)
  46. As far as Sex Goes?I'm Going... Going... Gone!
  47. SummaryI'm The SysOp, Gotta Love Me!
  48.  
  49. [PAUSE]D
  50.  
  51.  
  52. Revision A:
  53.  
  54.   Sorry about that, but it seems like there was a left out O_TRUNC sentence
  55.   that was scrambling REGISTRY.DAT, thanks to IceFreezer to point to me that
  56.   I forgot to change it at one place when I did the changes from FMD-32ß to
  57.   FMD-32 Release Version. There was also a missing "un" which was v4.24 code,
  58.   this has been replaced by usernum.
  59.  
  60.   If you are upgrading, just do step 7.
  61.  
  62. Revision B:
  63.  
  64.   - Updated for WWIV v4.24
  65.   - Fixed the newuser bug
  66.   - Fixed the color of text bug
  67.   - Fixed the "Alternative Worlds" is replace by your system name
  68.  
  69.  ┌┬═══════┐
  70.  ││ Tests ││
  71.   └═══════┴┘
  72.  
  73.   This modification has been tested on a virgin WWIV v4.24 source using
  74.   Borland C++ v4.5
  75.  
  76. ──────────────────────────────────────────────────────────────────────────────
  77.                                    Legend
  78.                           ╔═══╤══════════════════┐
  79.                           │ + │ Add This Line    │
  80.                           │ - │ Delete This Line │
  81.                           │ * │ Modify This Line │
  82.                           │ = │ Existing Line    │
  83.                           └═══╧══════════════════╝
  84. ───[Step 1]────────────────────────────────────────────────────────────────────
  85.  
  86. Load VARDEC.H and include this at the end of the file, just after inputpicrec:
  87.  
  88.  
  89. typedef struct {
  90.    char     realname[40],
  91.             sex,
  92.             aliases[81],
  93.             job[81],
  94.             sex_orientation[41],
  95.             goal[81],
  96.             food[81],
  97.             tv_show[81],
  98.             movie[81],
  99.             actor[81],
  100.             actress[81],
  101.             live_in[81],
  102.             vacation[81],
  103.             music[81],
  104.             drug[81],
  105.             alcohol[81],
  106.             date[81],
  107.             finance[81],
  108.             summary[162],
  109.             age[10],
  110.             movie_rate[50],
  111.             activity[81],
  112.             sexg[81];
  113.    int      filled;
  114.    char     res[98];
  115.  
  116. } registry_rec;
  117.  
  118. = /****************************************************************************/
  119. =
  120. = #include "instmsg.h"
  121. =
  122. = /****************************************************************************/
  123. =
  124. = #ifndef bbsmalloc
  125.  
  126. ───[Step 2]────────────────────────────────────────────────────────────────────
  127.  
  128. Load COM.C and look for the following lines:
  129.  
  130. =      case 20:
  131. =        if (echo)
  132. =          ptime();
  133. =        if (menu_on() && rip_pause) {
  134. =          pausescr();
  135. =        }
  136. =        break;
  137. =      case 18:
  138. =        if (echo)
  139. *          look_at_registry();
  140. =        break;
  141. =      case 25:
  142. =        thisuser.sysstatus ^= sysstatus_pause_on_page;
  143. =        break;
  144. =    }
  145.  
  146. Then add the following 2 functions at the end of the file;
  147. (You might already have them from other of our modifications)
  148.  
  149. void litebar(char *fmt, ...)
  150. {
  151.   va_list ap;
  152.   char s[512], s2[250];
  153.   
  154.   va_start(ap, fmt);
  155.   vsprintf(s, fmt, ap);
  156.   va_end(ap);
  157.   
  158.   if (okansi()) 
  159.   {
  160.     npr("\x1B[0;1m%s\r\n", charstr(strlen(s)+6, '▄'));
  161.     sprintf(s2, "\x1B[0;34;47m ∙ %s ∙ \x1B[40m", stripcolors(s));
  162.     pl(s2);
  163.     npr("\x1B[0;1;30m%s\r\n", charstr(strlen(s)+6, '▀'));
  164.   } else
  165.     pl(s);
  166.   ansic(0);
  167. }
  168.  
  169. void litebar3(char *fmt, ...)
  170. {
  171.   int i;
  172.   va_list ap;
  173.   char s[512], s1[512];
  174.   
  175.   va_start(ap, fmt);
  176.   vsprintf(s, fmt, ap);
  177.   va_end(ap);
  178.  
  179.    i=(74-strlen(s))/2;
  180.   if (okansi())
  181.   {
  182.     sprintf(s1,"%s%s%s",charstr(i,' '),stripcolors(s),charstr(i,' '));
  183.     npr("\x1B[0;1;36m%s\r\n",charstr(strlen(s1)+4,'▄'));
  184.     npr("\x1B[0;30;46m ∙%s∙ \x1B[40m\r\n",s1);
  185.     npr("\x1B[0;1;30m%s\r\n",charstr(strlen(s1)+4,'▀'));
  186.   } else {
  187.     npr("%s%s\r\n", charstr(i,' '), s);
  188.   }
  189.   ansic(0);
  190. }
  191.  
  192. ───[Step 3]────────────────────────────────────────────────────────────────────
  193.  
  194. Load MISCCMD.C and copy the following functions at the end of the file:
  195.  
  196. void fill_registry(void)
  197. {
  198.   int i, i2, f;
  199.   char s[81];
  200.   registry_rec r;
  201.  
  202.   prt(7, "Creating registry data file... ");
  203.   sprintf(s,"%sREGISTRY.DAT",syscfg.datadir);
  204.   f=sh_open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  205.   i2=number_userrecs();
  206.   for (i=1; i<=i2; i++) {
  207.     npr("%-3d", i);
  208.     sh_lseek(f,(long)(i-1)*sizeof(registry_rec),SEEK_SET);
  209.     r.realname[0]=0;
  210.     r.sex=' ';
  211.     r.aliases[0]=0;
  212.     r.job[0]=0;
  213.     r.sex_orientation[0]=0;
  214.     r.goal[0]=0;
  215.     r.food[0]=0;
  216.     r.tv_show[0]=0;
  217.     r.movie[0]=0;
  218.     r.actor[0]=0;
  219.     r.actress[0]=0;
  220.     r.live_in[0]=0;
  221.     r.vacation[0]=0;
  222.     r.music[0]=0;
  223.     r.drug[0]=0;
  224.     r.alcohol[0]=0;
  225.     r.date[0]=0;
  226.     r.finance[0]=0;
  227.     r.summary[0]=0;
  228.     r.movie_rate[0]=0;
  229.     r.age[0]=0;
  230.     r.sexg[0]=0;
  231.     r.activity[0]=0;
  232.     r.filled=0;
  233.     sh_lseek(f,(long)(i-1)*sizeof(registry_rec),SEEK_SET);
  234.     sh_write(f,(void *)&r,sizeof(registry_rec));
  235.     backspace();
  236.     backspace();
  237.     backspace();
  238.   }
  239.   pl("1Done!");
  240.   nl();
  241.   sh_close(f);
  242. }
  243.  
  244. void enter_info(void)
  245. {
  246.   int f;
  247.   char s[81];
  248.   registry_rec r;
  249.  
  250.   sprintf(s,"%sREGISTRY.DAT",syscfg.datadir);
  251.   f=sh_open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  252.   sh_lseek(f,(long)(usernum-1)*sizeof(registry_rec),SEEK_SET);
  253.   sh_read(f,(void *)&r,sizeof(registry_rec));
  254.   if (r.filled==1) {
  255.     nl();
  256.     pl("6Registry already filled! Use the edit function.");
  257.     nl();
  258.     pausescr();
  259.     sh_close(f);
  260.     return;
  261.   }
  262.   litebar3("%s Registry.", syscfg.systemname);
  263.   ansic(0);
  264.   nl();
  265.   pl("You will now be prompted to enter assorted information for your entry");
  266.   pl("into the Registry Database.  If you prefer not to answer certain");
  267.   pl("questions for personal reasons, type \"N/A\" (for not available).  If you");
  268.   pl("leave the entry questionnaire before completing it all, it will not be");
  269.   pl("SAVED (you may enter X to exit the questionnaire).");
  270.   nl();
  271.   pl("After you complete your entry, you will be able to edit any part of it");
  272.   pl("at any time.  Feel free to update your Information as frequently as you");
  273.   pl("wish.");
  274.   nl();
  275.   pl("1Please Enter your real name:");
  276.   mpl(39);
  277.   inputl(r.realname, 39);
  278.   nl();
  279.   if (r.realname[0]==0)
  280.     strcpy(r.realname, "N/A");
  281.   pl("1What sex are you (M/F):");
  282.   mpl(1);
  283.   r.sex=onek("MF");
  284.   nl();
  285.   pl("1And what is your age?");
  286.   mpl(3);
  287.   input(r.age, 3);
  288.   nl();
  289.   if (r.age[0]==0)
  290.     strcpy(r.age, "N/A");
  291.   pl("1What other handles, nicknames, or aliases do you go by?");
  292.   mpl(40);
  293.   inputl(r.aliases, 40);
  294.   nl();
  295.   if (r.aliases[0]==0)
  296.     strcpy(r.aliases, "N/A");
  297.   pl("1What do you do for a Living (Job, Studies) ?");
  298.   mpl(40);
  299.   inputl(r.job, 40);
  300.   nl();
  301.   if (r.job[0]==0)
  302.     strcpy(r.job, "N/A");
  303.   pl("1What is your sexual orientation?");
  304.   mpl(20);
  305.   inputl(r.sex_orientation, 20);
  306.   nl();
  307.   if (r.sex_orientation[0]==0)
  308.     strcpy(r.sex_orientation, "N/A");
  309.   pl("1What are your Goals in Life?");
  310.   mpl(40);
  311.   inputl(r.goal, 40);
  312.   nl();
  313.   if (r.goal[0]==0)
  314.     strcpy(r.goal, "N/A");
  315.   pl("1What is your favorite kind of food?");
  316.   mpl(40);
  317.   inputl(r.food, 40);
  318.   nl();
  319.   if (r.food[0]==0)
  320.     strcpy(r.food, "N/A");
  321.   pl("1What is (are) your favorite TV show(s)?");
  322.   mpl(40);
  323.   inputl(r.tv_show, 40);
  324.   nl();
  325.   if (r.tv_show[0]==0)
  326.     strcpy(r.tv_show, "N/A");
  327.   pl("1What is your favorite movie?");
  328.   mpl(40);
  329.   inputl(r.movie, 40);
  330.   nl();
  331.   if (r.movie[0]==0)
  332.     strcpy(r.movie, "N/A");
  333.   pl("1How often do you watch movies?");
  334.   mpl(40);
  335.   inputl(r.movie_rate, 40);
  336.   nl();
  337.   if (r.movie_rate[0]==0)
  338.     strcpy(r.movie_rate, "N/A");
  339.   pl("1Who is your favorite actor?");
  340.   mpl(40);
  341.   inputl(r.actor, 40);
  342.   nl();
  343.   if (r.actor[0]==0)
  344.     strcpy(r.actor, "N/A");
  345.   pl("1Who is your favorite actress?");
  346.   mpl(40);
  347.   inputl(r.actress, 40);
  348.   nl();
  349.   if (r.actress[0]==0)
  350.     strcpy(r.actress, "N/A");
  351.   pl("1Where would be your favorite place to live?");
  352.   mpl(40);
  353.   inputl(r.live_in, 40);
  354.   nl();
  355.   if (r.live_in[0]==0)
  356.     strcpy(r.live_in, "N/A");
  357.   pl("1What is your favorite vacation spot?");
  358.   mpl(40);
  359.   inputl(r.vacation, 40);
  360.   nl();
  361.   if (r.vacation[0]==0)
  362.     strcpy(r.vacation, "N/A");
  363.   pl("1What is your Favorite Kind of Music?");
  364.   mpl(40);
  365.   inputl(r.music, 40);
  366.   nl();
  367.   if (r.music[0]==0)
  368.     strcpy(r.music, "N/A");
  369.   pl("1What is your opinion on drugs?");
  370.   mpl(40);
  371.   inputl(r.drug, 40);
  372.   nl();
  373.   if (r.drug[0]==0)
  374.     strcpy(r.drug, "N/A");
  375.   pl("1What are your drinking habits?");
  376.   mpl(40);
  377.   inputl(r.alcohol, 40);
  378.   nl();
  379.   if (r.alcohol[0]==0)
  380.     strcpy(r.alcohol, "N/A");
  381.   pl("1What is your ideal date?");
  382.   mpl(40);
  383.   inputl(r.date, 40);
  384.   nl();
  385.   if (r.date[0]==0)
  386.     strcpy(r.date, "N/A");
  387.   pl("1What is your favorite activity?");
  388.   mpl(40);
  389.   inputl(r.activity, 40);
  390.   nl();
  391.   if (r.activity[0]==0)
  392.     strcpy(r.activity, "N/A");
  393.   pl("1What is your financial status?");
  394.   mpl(40);
  395.   inputl(r.finance, 40);
  396.   nl();
  397.   if (r.finance[0]==0)
  398.     strcpy(r.finance, "N/A");
  399.   pl("1And as far as Sex Goes?");
  400.   mpl(40);
  401.   inputl(r.sexg, 40);
  402.   nl();
  403.   if (r.sexg[0]==0)
  404.     strcpy(r.sexg, "N/A");
  405.   pl("1Ok, now you can enter a Brief (39 characters max.) summary of yourself for");
  406.   pl("1others to see in the directory (option \"D\" from the Registry Menu).");
  407.   nl();
  408.   mpl(39);
  409.   inputl(r.summary, 39);
  410.   nl();
  411.   if (r.sexg[0]==0)
  412.     strcpy(r.sexg, "N/A");
  413.   r.filled=1;
  414.   nl();
  415.   pl("3Ok, your entry has been added to the database.");
  416.   pl("3Thanks for your participation!");
  417.   nl();
  418.   pausescr();
  419.   sh_lseek(f,(long)(usernum-1)*sizeof(registry_rec),SEEK_SET);
  420.   if (!hangup)
  421.     sh_write(f,(void *)&r,sizeof(registry_rec));
  422.   sh_close(f);
  423. }
  424.  
  425. void see_info(int un)
  426. {
  427.  int f, c1;
  428.  char s[81];
  429.  registry_rec r;
  430.  userrec u;
  431.  
  432.  c1=thisuser.colors[0];
  433.  thisuser.colors[0]=15;
  434.  nl();
  435.  prt(1, "Reading Informations...");
  436.  sprintf(s,"%sREGISTRY.DAT", syscfg.datadir);
  437.  f=sh_open1(s,O_RDONLY | O_BINARY);
  438.  sh_lseek(f,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
  439.  sh_read(f,(void *)&r,sizeof(registry_rec));
  440.  if (r.filled==0) {
  441.     nl();
  442.     pl("1Sorry, but that user haven't filled his registry yet!");
  443.     nl();
  444.     pausescr();
  445.     sh_close(f);
  446.     thisuser.colors[0]=c1;
  447.     return;
  448.  }
  449.  read_user(un, &u);
  450.  outchr(12);
  451.  litebar3("%s On-Line User Lookup", syscfg.systemname);
  452.  nl();
  453.  npr("0Real Name3:  1%.17s  0Sex3: 1%c  0Age3: 1%s   0Aliases3: 1%.18s\r\n", r.realname, r.sex, r.age, r.aliases);
  454.  npr("0Makes a Living as3: 1 %s\r\n", r.job);
  455.  npr("0Sexual Orientation is3:1 %s\r\n", r.sex_orientation);
  456.  npr("0Future Goals in Life3: 1%s\r\n", r.goal);
  457.  npr("0Favorite Kind of Food3:1 %s\r\n", r.food);
  458.  npr("0Favorite TV Show(s)3: 1%s\r\n", r.tv_show);
  459.  npr("0Favorite Movie3:1 %.30s  0Watches Movies3: 1%.30s\r\n", r.movie, r.movie_rate);
  460.  npr("0Favorite Actor3: 1%.30s  0Favorite Actress3:1 %.30s\r\n", r.actor, r.actress);
  461.  npr("0Place I'd Like to Live in3: 1%s\r\n", r.live_in);
  462.  npr("0Favorite Vacation Spot3: 1%s\r\n", r.vacation);
  463.  npr("0Drinking Habits3: 1%s\r\n", r.alcohol);
  464.  npr("0Favorite Music3: 1%s\r\n", r.music);
  465.  npr("0Favorite Activity3: 1%s\r\n", r.activity);
  466.  npr("0Opinion on Drugs3: 1%s\r\n", r.drug);
  467.  npr("0Ideal Date3: 1%s\r\n", r.date);
  468.  npr("0Financial Status3: 1%s\r\n", r.finance);
  469.  npr("0As far as Sex Goes?3: 1%s\r\n", r.sexg);
  470.  npr("0Summary3: 1%s\r\n",r.summary);
  471.  nl();
  472.  sh_close(f);
  473.  pausescr();
  474.  thisuser.colors[0]=c1;
  475. }
  476.  
  477. void look_at_registry(void)
  478. {
  479.   char s[81], xl[81], cl[81], atr[81], cc;
  480.   unsigned un;
  481.  
  482.   savel(cl, atr, xl, &cc);
  483.   nln(2);
  484.   prt(1,"See the registery of which user?");
  485.   nl();
  486.   outstr(":");
  487.   mpl(30);
  488.   input(s,30);
  489.   un=finduser1(s);
  490.   if (un>0)
  491.     see_info(un);
  492.   else {
  493.     nl();
  494.     pl(get_string(8));
  495.     nl();
  496.   }
  497.   restorel(cl, atr, xl, &cc);
  498. }
  499.  
  500. void registry_menu(void)
  501. {
  502.   int done=0;
  503.   char ch;
  504.  
  505.   do {
  506.     outchr(12);
  507.     litebar("User Registry Menu");
  508.     nln(2);
  509.     pl("7[1E7]nter your registry informations.");
  510.     pl("7[1R7]evise your registry informations.");
  511.     pl("7[1L7]ook-up another user's entry.");
  512.     pl("7[1D7]irectory of available registries.");
  513.     pl("7[1Q7]uit.");
  514.     nln(2);
  515.     prt(2,"Selection: ");
  516.     mpl(1);
  517.     ch=onek("QERLD");
  518.     switch (ch)
  519.     {
  520.       case 'Q': done=1; break;
  521.       case 'L': look_at_registry(); break;
  522.       case 'E': enter_info(); break;
  523.       case 'R': revise_entry(); break;
  524.       case 'D': registry_directory(); break;
  525.      }
  526.   } while (!done && !hangup);
  527. }
  528.  
  529. int check_registry(int un)
  530. {
  531.   char s[81];
  532.   int f;
  533.   registry_rec r;
  534.  
  535.   sprintf(s,"%sREGISTRY.DAT", syscfg.datadir);
  536.   f=sh_open1(s,O_RDONLY | O_BINARY);
  537.   sh_lseek(f,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
  538.   sh_read(f,(void *)&r,sizeof(registry_rec));
  539.   sh_close(f);
  540.   if (r.filled==1)
  541.     return(0);
  542.   else
  543.     return(1);
  544. }
  545.  
  546. void registry_directory(void)
  547. {
  548.   int i, f;
  549.   char s[81], s1[81];
  550.   registry_rec r;
  551.   userrec u;
  552.  
  553.   sprintf(s,"%sREGISTRY.DAT", syscfg.datadir);
  554.   f=sh_open1(s,O_RDONLY | O_BINARY);
  555.   outchr(12);
  556.   litebar3("User Directory");
  557.   nl();
  558.   for (i=0; i<status.users; i++) {
  559.     read_user(smallist[i].number, &u);
  560.     strcpy(s1, u.name);
  561.     sh_lseek(f,(long)(smallist[i].number-1)*sizeof(registry_rec),SEEK_SET);
  562.     sh_read(f,(void *)&r,sizeof(registry_rec));
  563.     if (r.filled) {
  564.       npr("1%.30s7%s0%-39.39s\r\n", s1, charstr(40-strlen(s1), '.'), r.summary);
  565.     }
  566.   }
  567.   nl();
  568.   pausescr();
  569.   sh_close(f);
  570.  
  571. }
  572.  
  573. void revise_entry(void)
  574. {
  575.   int f, c1;
  576.   char s[81], ch;
  577.   registry_rec r;
  578.  
  579.   sprintf(s,"%sREGISTRY.DAT",syscfg.datadir);
  580.   f=sh_open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  581.   sh_lseek(f,(long)(usernum-1)*sizeof(registry_rec),SEEK_SET);
  582.   sh_read(f,(void *)&r,sizeof(registry_rec));
  583.   if (r.filled==0) {
  584.     nl();
  585.     pl("6Registry not filled! Use the enter informations function.");
  586.     nl();
  587.     pausescr();
  588.     sh_close(f);
  589.     return;
  590.   }
  591.   c1=thisuser.colors[0];
  592.   thisuser.colors[0]=15;
  593.   do
  594.   {
  595.     outchr(12);
  596.     npr("7[1A7] 0Real Name3:  1%.17s  7[1B7] 0Sex3: 1%c  7[1C7] 0Age3: 1%s   7[1D7] 0Aliases3: 1%.18s\r\n", r.realname, r.sex, r.age, r.aliases);
  597.     npr("7[1E7] 0Makes a Living as3: 1 %s\r\n", r.job);
  598.     npr("7[1F7] 0Sexual Orientation is3:1 %s\r\n", r.sex_orientation);
  599.     npr("7[1G7] 0Future Goals in Life3: 1%s\r\n", r.goal);
  600.     npr("7[1H7] 0Favorite Kind of Food3:1 %s\r\n", r.food);
  601.     npr("7[1I7] 0Favorite TV Show(s)3: 1%s\r\n", r.tv_show);
  602.     npr("7[1J7] 0Favorite Movie3:1 %.30s  7[1K7] 0Watches Movies3: 1%.30s\r\n", r.movie, r.movie_rate);
  603.     npr("7[1L7] 0Favorite Actor3: 1%.30s  7[1M7] 0Favorite Actress3:1 %.30s\r\n", r.actor, r.actress);
  604.     npr("7[1N7] 0Place I'd Like to Live in3: 1%s\r\n", r.live_in);
  605.     npr("7[1O7] 0Favorite Vacation Spot3: 1%s\r\n", r.vacation);
  606.     npr("7[1P7] 0Drinking Habits3: 1%s\r\n", r.alcohol);
  607.     npr("7[1Q7] 0Favorite Music3: 1%s\r\n", r.music);
  608.     npr("7[1R7] 0Favorite Activity3: 1%s\r\n", r.activity);
  609.     npr("7[1S7] 0Opinion on Drugs3: 1%s\r\n", r.drug);
  610.     npr("7[1T7] 0Ideal Date3: 1%s\r\n", r.date);
  611.     npr("7[1U7] 0Financial Status3: 1%s\r\n", r.finance);
  612.     npr("7[1V7] 0As far as Sex Goes?3: 1%s\r\n", r.sexg);
  613.     npr("7[1W7] 0Summary3: 1%s\r\n",r.summary);
  614.     nl();
  615.     prt(2, "Selection (X=Quit): ");
  616.     mpl(1);
  617.     ch=onek("ABCDEFGHIJKLMNOPQRSTUVWX");
  618.     switch (ch)
  619.     {
  620.        case 'A':
  621.          nl();
  622.          pl("1What is your real name?");
  623.          mpl(39);
  624.          inputl(r.realname, 39);
  625.          nl();
  626.          if (r.realname[0]==0)
  627.            strcpy(r.realname, "N/A");
  628.          break;
  629.        case 'B':
  630.          nl();
  631.          pl("1What is your gender (M/F) ?");
  632.          mpl(1);
  633.          r.sex=onek("MF");
  634.          nl();
  635.          break;
  636.        case 'C':
  637.          nl();
  638.          pl("1What is your age?");
  639.          mpl(3);
  640.          input(r.age, 3);
  641.          nl();
  642.          if (r.age[0]==0)
  643.            strcpy(r.age, "N/A");
  644.          break;
  645.        case 'D':
  646.          nl();
  647.          pl("1What are your other aliases?");
  648.          mpl(40);
  649.          inputl(r.aliases, 40);
  650.          nl();
  651.          if (r.aliases[0]==0)
  652.            strcpy(r.aliases, "N/A");
  653.          break;
  654.        case 'E':
  655.          nl();
  656.          pl("1What is your job?");
  657.          mpl(40);
  658.          inputl(r.job, 40);
  659.          nl();
  660.          if (r.job[0]==0)
  661.            strcpy(r.job, "N/A");
  662.          break;
  663.        case 'F':
  664.          nl();
  665.          pl("1What is your sexual orientation?");
  666.          mpl(20);
  667.          inputl(r.sex_orientation, 20);
  668.          nl();
  669.          if (r.sex_orientation[0]==0)
  670.            strcpy(r.sex_orientation, "N/A");
  671.          break;
  672.        case 'G':
  673.          nl();
  674.          pl("1What are your future goals in life?");
  675.          mpl(40);
  676.          inputl(r.goal, 40);
  677.          nl();
  678.          if (r.goal[0]==0)
  679.            strcpy(r.goal, "N/A");
  680.          break;
  681.        case 'H':
  682.          nl();
  683.          pl("1What is your favorite kind of food?");
  684.          mpl(40);
  685.          inputl(r.food, 40);
  686.          nl();
  687.          if (r.food[0]==0)
  688.            strcpy(r.food, "N/A");
  689.          break;
  690.        case 'I':
  691.          nl();
  692.          pl("1What is your favorite TV show?");
  693.          mpl(40);
  694.          inputl(r.tv_show, 40);
  695.          nl();
  696.          if (r.tv_show[0]==0)
  697.            strcpy(r.tv_show, "N/A");
  698.          break;
  699.        case 'J':
  700.          nl();
  701.          pl("1What is your favorite movie?");
  702.          mpl(40);
  703.          inputl(r.movie, 40);
  704.          nl();
  705.          if (r.movie[0]==0)
  706.            strcpy(r.movie, "N/A");
  707.          break;
  708.        case 'K':
  709.          nl();
  710.          pl("1How often do you watch movies?");
  711.          mpl(40);
  712.          inputl(r.movie_rate, 40);
  713.          nl();
  714.          if (r.movie_rate[0]==0)
  715.            strcpy(r.movie_rate, "N/A");
  716.          break;
  717.        case 'L':
  718.          nl();
  719.          pl("1Who is your favorite actor?");
  720.          mpl(40);
  721.          inputl(r.actor, 40);
  722.          nl();
  723.          if (r.actor[0]==0)
  724.            strcpy(r.actor, "N/A");
  725.          break;
  726.        case 'M':
  727.          nl();
  728.          pl("1Who is your favorite actress?");
  729.          mpl(40);
  730.          inputl(r.actress, 40);
  731.          nl();
  732.          if (r.actress[0]==0)
  733.            strcpy(r.actress, "N/A");
  734.          break;
  735.        case 'N':
  736.          nl();
  737.          pl("1Where would you like to live?");
  738.          mpl(40);
  739.          inputl(r.live_in, 40);
  740.          nl();
  741.          if (r.live_in[0]==0)
  742.            strcpy(r.live_in, "N/A");
  743.          break;
  744.        case 'O':
  745.          nl();
  746.          pl("1Where is your favorite vacation spot?");
  747.          mpl(40);
  748.          inputl(r.vacation, 40);
  749.          nl();
  750.          if (r.vacation[0]==0)
  751.            strcpy(r.vacation, "N/A");
  752.          break;
  753.        case 'P':
  754.          nl();
  755.          pl("1What are your drinking habits?");
  756.          mpl(40);
  757.          inputl(r.alcohol, 40);
  758.          nl();
  759.          if (r.alcohol[0]==0)
  760.            strcpy(r.alcohol, "N/A");
  761.          break;
  762.        case 'Q':
  763.          nl();
  764.          pl("1What is your favorite music?");
  765.          mpl(40);
  766.          inputl(r.music, 40);
  767.          nl();
  768.          if (r.music[0]==0)
  769.            strcpy(r.music, "N/A");
  770.          break;
  771.        case 'R':
  772.          nl();
  773.          pl("1What is your favorite activity?");
  774.          mpl(40);
  775.          inputl(r.activity, 40);
  776.          nl();
  777.          if (r.activity[0]==0)
  778.            strcpy(r.activity, "N/A");
  779.          break;
  780.        case 'S':
  781.          nl();
  782.          pl("1What is your opinion on drugs?");
  783.          mpl(40);
  784.          inputl(r.drug, 40);
  785.          nl();
  786.          if (r.drug[0]==0)
  787.            strcpy(r.drug, "N/A");
  788.          break;
  789.        case 'T':
  790.          nl();
  791.          pl("1What is your ideal date?");
  792.          mpl(40);
  793.          inputl(r.date, 40);
  794.          nl();
  795.          if (r.date[0]==0)
  796.            strcpy(r.date, "N/A");
  797.          break;
  798.        case 'U':
  799.          nl();
  800.          pl("1What is your financial status?");
  801.          mpl(40);
  802.          inputl(r.finance, 40);
  803.          nl();
  804.          if (r.finance[0]==0)
  805.            strcpy(r.finance, "N/A");
  806.          break;
  807.        case 'V':
  808.          nl();
  809.          pl("1As far as Sex Goes?");
  810.          mpl(40);
  811.          inputl(r.sexg, 40);
  812.          nl();
  813.          if (r.sexg[0]==0)
  814.            strcpy(r.sexg, "N/A");
  815.          break;
  816.        case 'W':
  817.          nl();
  818.          pl("1Summary?");
  819.          mpl(39);
  820.          inputl(r.summary, 39);
  821.          nl();
  822.          if (r.summary[0]==0)
  823.            strcpy(r.summary, "N/A");
  824.          break;
  825.        case 'X':
  826.          sh_lseek(f,(long)(usernum-1)*sizeof(registry_rec),SEEK_SET);
  827.          sh_write(f,(void *)&r,sizeof(registry_rec));
  828.          sh_close(f);
  829.          thisuser.colors[0]=c1;
  830.          return;
  831.     }
  832.   } while (!hangup);
  833.   thisuser.colors[0]=c1;
  834. }
  835.  
  836.  
  837. ───[Step 4]────────────────────────────────────────────────────────────────────
  838.  
  839. Load LILO.C and do the following change to void logon
  840.  
  841.  
  842. =    prt(3,get_string(378));
  843. =    nl();
  844. =  }
  845. +  if (check_registry(usernum)) {
  846. +    pl("\77By the way, you haven't filled out your Registry entry yet...");
  847. +    pl("7Just select \"1/I7\" from the MAIN menu to enter the Registry!");
  848. +  }
  849. +  nl();
  850. =  if ((incom) || (sysop1()))
  851. =    broadcast(get_string(1172));
  852.  
  853.  
  854. ───[Step 5]────────────────────────────────────────────────────────────────────
  855.  
  856. Load MMENU.C and do the following modifications to function mainmenu:
  857.  
  858. =      sysoplog(get_stringx(1,12));
  859. =      text_edit();
  860. =    }
  861. +    if (strcmp(s, "RESETREGISTRY")==0)
  862. +      fill_registry();
  863. =    if ((strcmp(s,"UEDIT")==0) || (strcmp(s,"UE")==0)) {
  864.  
  865. and lower...
  866.  
  867. =  if (strcmp(s,"/O")==0) {
  868. =    if (numbatchdl!=0) {
  869. =      nl();
  870. =      outstr(get_string(1324));
  871. =      if (ny())
  872. =        batchdl(1);
  873. =      else
  874. =        hangup=1;
  875. =    } else
  876. =      hangup=1;
  877. =  }
  878. +  if (strcmp(s,"/I")==0)
  879. +    registry_menu();
  880. =  if (strcmp(s,"/R")==0) {
  881. =    if (using_modem) {
  882. =      rip = rip_check();
  883. =      if (rip_on()) {
  884.  
  885. ───[Step 6]────────────────────────────────────────────────────────────────────
  886.  
  887. Load UEDIT.C and do the following change to function deluser:
  888.  
  889. =void deluser(int un)
  890. ={
  891. =  userrec u;
  892. =  int i,i1,f,n;
  893. =  mailrec m;
  894. *  char fn[81], s[81];
  895. =  votingrec v;
  896. =  voting_response vr;
  897. +  registry_rec r;
  898. =
  899. =  read_user(un,&u);
  900. =  if ((u.inact & inact_deleted)==0) {
  901. +    sprintf(s,"%sREGISTRY.DAT",syscfg.datadir);
  902. +    f=sh_open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  903. +    sh_lseek(f,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
  904. +    sh_read(f,(void *)&r,sizeof(registry_rec));
  905. +    r.realname[0]=0;
  906. +    r.sex=' ';
  907. +    r.aliases[0]=0;
  908. +    r.job[0]=0;
  909. +    r.sex_orientation[0]=0;
  910. +    r.goal[0]=0;
  911. +    r.food[0]=0;
  912. +    r.tv_show[0]=0;
  913. +    r.movie[0]=0;
  914. +    r.actor[0]=0;
  915. +    r.actress[0]=0;
  916. +    r.live_in[0]=0;
  917. +    r.vacation[0]=0;
  918. +    r.music[0]=0;
  919. +    r.drug[0]=0;
  920. +    r.alcohol[0]=0;
  921. +    r.date[0]=0;
  922. +    r.finance[0]=0;
  923. +    r.summary[0]=0;
  924. +    r.movie_rate[0]=0;
  925. +    r.age[0]=0;
  926. +    r.sexg[0]=0;
  927. +    r.activity[0]=0;
  928. +    r.filled=0;
  929. +    sh_lseek(f,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
  930. +    sh_write(f,(void *)&r,sizeof(registry_rec));
  931. +    sh_close(f);
  932. =    rsm(un,&u,0);
  933. =    dsr(u.name);
  934.  
  935. ───[Step 7]────────────────────────────────────────────────────────────────────
  936.  
  937. Load NEWUSER.C and replace function find_new_usernum:
  938.  
  939. int find_new_usernum(userrec *u, unsigned long *qsc)
  940. {
  941.   char s[81], s1[81];
  942.   int f, f1, nu, un,n;
  943.   userrec tu;
  944.   registry_rec r;
  945.  
  946.   sprintf(s,"%sUSER.LST",syscfg.datadir);
  947.  
  948.   f=-1;
  949.   for (n=0; (f<0) && (n<20); n++) {
  950.     f=sh_open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  951.     if (f<0) {
  952.       wait1(2);
  953.     }
  954.   }
  955.   if (f<0)
  956.     return(-1);
  957.  
  958.   nu=((int) (filelength(f)/syscfg.userreclen)-1);
  959.   sh_lseek(f, syscfg.userreclen, SEEK_SET);
  960.   un=1;
  961.  
  962.   read_status();
  963.   if (nu == status.users) {
  964.     un=nu+1;
  965.     sh_lseek(f, ((long) syscfg.userreclen) * ((long) un), SEEK_SET);
  966.     sh_write(f, (void *)u, syscfg.userreclen);
  967.     sh_close(f);
  968.     write_qscn(un, qsc, 0);
  969.     isr(un, u->name);
  970.     sprintf(s1,"%sREGISTRY.DAT",syscfg.datadir);
  971.     f1=sh_open(s1,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  972.     sh_lseek(f1,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
  973.     r.realname[0]=0;
  974.     r.sex=' ';
  975.     r.aliases[0]=0;
  976.     r.job[0]=0;
  977.     r.sex_orientation[0]=0;
  978.     r.goal[0]=0;
  979.     r.food[0]=0;
  980.     r.tv_show[0]=0;
  981.     r.movie[0]=0;
  982.     r.actor[0]=0;
  983.     r.actress[0]=0;
  984.     r.live_in[0]=0;
  985.     r.vacation[0]=0;
  986.     r.music[0]=0;
  987.     r.drug[0]=0;
  988.     r.alcohol[0]=0;
  989.     r.date[0]=0;
  990.     r.finance[0]=0;
  991.     r.summary[0]=0;
  992.     r.movie_rate[0]=0;
  993.     r.age[0]=0;
  994.     r.sexg[0]=0;
  995.     r.activity[0]=0;
  996.     r.filled=0;
  997.     sh_lseek(f1,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
  998.     sh_write(f1,(void *)&r,sizeof(registry_rec));
  999.     sh_close(f1);
  1000.   } else {
  1001.  
  1002.     while (un<=nu) {
  1003.       if (un%25 == 0) {
  1004.         f=sh_close(f);
  1005.         for (n=0; (f<0) && (n<20); n++) {
  1006.           f=sh_open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  1007.           if (f<0) {
  1008.             wait1(2);
  1009.           }
  1010.         }
  1011.         if (f<0)
  1012.           return(-1);
  1013.         sh_lseek(f, ((long) syscfg.userreclen) * ((long) un), SEEK_SET);
  1014.         nu=((int) (filelength(f)/syscfg.userreclen)-1);
  1015.       }
  1016.  
  1017.       sh_read(f, (void *)&tu, syscfg.userreclen);
  1018.  
  1019.       if (tu.inact & inact_deleted) {
  1020.         sh_lseek(f, ((long) syscfg.userreclen) * ((long) un), SEEK_SET);
  1021.         sh_write(f, (void *)u, syscfg.userreclen);
  1022.         sh_close(f);
  1023.         write_qscn(un, qsc, 0);
  1024.         isr(un, u->name);
  1025.         sprintf(s1,"%sREGISTRY.DAT",syscfg.datadir);
  1026.         f1=sh_open(s1,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  1027.         sh_lseek(f1,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
  1028.         r.realname[0]=0;
  1029.         r.sex=' ';
  1030.         r.aliases[0]=0;
  1031.         r.job[0]=0;
  1032.         r.sex_orientation[0]=0;
  1033.         r.goal[0]=0;
  1034.         r.food[0]=0;
  1035.         r.tv_show[0]=0;
  1036.         r.movie[0]=0;
  1037.         r.actor[0]=0;
  1038.         r.actress[0]=0;
  1039.         r.live_in[0]=0;
  1040.         r.vacation[0]=0;
  1041.         r.music[0]=0;
  1042.         r.drug[0]=0;
  1043.         r.alcohol[0]=0;
  1044.         r.date[0]=0;
  1045.         r.finance[0]=0;
  1046.         r.summary[0]=0;
  1047.         r.movie_rate[0]=0;
  1048.         r.age[0]=0;
  1049.         r.sexg[0]=0;
  1050.         r.activity[0]=0;
  1051.         r.filled=0;
  1052.         sh_lseek(f1,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
  1053.         sh_write(f1,(void *)&r,sizeof(registry_rec));
  1054.         sh_close(f1);
  1055.         return(un);
  1056.       } else
  1057.         un++;
  1058.     }
  1059.   }
  1060.  
  1061.   if (un <= syscfg.maxusers) {
  1062.     sh_lseek(f, ((long) syscfg.userreclen) * ((long) un), SEEK_SET);
  1063.     sh_write(f, (void *)u, syscfg.userreclen);
  1064.     sh_close(f);
  1065.     write_qscn(un, qsc, 0);
  1066.     isr(un, u->name);
  1067.     return(un);
  1068.   } else {
  1069.     sh_close(f);
  1070.     return(-1);
  1071.   }
  1072. }
  1073.  
  1074.  
  1075. Then lower in NEWUSER.C
  1076.  
  1077. =      input(s,8);
  1078. =      if (strcmp(s,thisuser.pw)==0)
  1079. =        ok=1;
  1080. =    } while ((!ok) && (!hangup));
  1081. =    checkit=0;
  1082. +    nl();
  1083. +    pl("9The user registry is informations about yourself that everyone will be");
  1084. +    pl("9able to view on-line.");
  1085. +    nl();
  1086. +    pl("1Would you like to enter your registry informations? ");
  1087. +    if (yn())
  1088. +      enter_info();
  1089. +    nl();
  1090. =    if (incom) {
  1091. =      if (printfile("FEEDBACK"))
  1092.  
  1093. ───[Step 8]────────────────────────────────────────────────────────────────────
  1094.  
  1095. You now need to do MAKE FCNS, compile & enjoy, you now have a full registry
  1096. system on your BBS. Tell your user and update your menus. First thing to do
  1097. when you'll put your board up is to do a //RESETREGISTRY, that should be the
  1098. only time you need to use that, it will create the empty registry fields.
  1099.  
  1100. /I is to acces the registry menu and CTRL-R anywhere on the
  1101. BBS is to look at other people registry.
  1102.  
  1103.  
  1104. French Proverb: L'amitié est plus forte que l'amour.
  1105.  
  1106. For comments, bug report and suggestion, e-mail at the following address:
  1107.  
  1108. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  1109.                  -> spotnick@gamemaster.qc.ca
  1110. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  1111.                  -> martin.bourdages@radio.magicnet.com
  1112.  
  1113.                  =>   French Mod Division Support Sub   <=
  1114.                                 SubType: FMD
  1115.                            Host: @20302 (WWIVnet)
  1116.                       Scan sublist for other networks
  1117.  
  1118.         Read PRODUCTS.FMD for the full list of our support systems.
  1119.  
  1120. ───[EOF]──────────────────────────────────────────────────────────────────────
  1121.