home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-06-22 | 31.4 KB | 1,122 lines |
- Nicolas Leblanc #2 @20302
- Sat Jun 10 13:06:01 1995
- ┌┬─── ── ─ ─ ── ───────────────────────────────────────────────────┬─ ∙∙
- ││ Alternative Worlds Presents │
- └┼─────────────────────────────────────────────────────────────────────┐
- ││ Mod Name » FMD-32b.MOD │∙
- ││ Difficulty » ████▒▒▒▒▒▒▒ (4/10) │:
- ││ WWIV Version » 4.24 ││
- ││ Date Affected » 06/01/95 ││
- :│ Files Affected » MMENU.C / MISCCMD.C / LILO.C / COM.C / UEDIT.C ││
- ∙│ NEWUSER.C / VARDEC.H ││
- ∙│ Description » Registeries of Users For WWIV ││
- └─────────────────────────────────────────────────────────────────────┼┐
- │ A French Mod Division Release - (C) 1995 FMD Software ││
- ∙∙ ─┴─────────────────────────────────────────────────── ── ─ ─ ── ───└┘
-
-
- ┌┬══════════════════┐
- ││ Long Description ││
- └══════════════════┴┘
-
- This is the real thing, a real user registry just like Major BBS, easy
- to install, and very easy to use!
-
- The registry will look like that:
-
- ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
- ∙ Digital Republic On-Line User Lookup ∙
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
- Real Name: Nicolas LeBlanc Sex: M Age: 21 Aliases: Spotnick
- Makes a Living as: Student
- Sexual Orientation is: Straight
- Future Goals in Life: Be Rich!
- Favorite Kind of Food: Italian
- Favorite TV Show(s): Beverly Hills, 90210
- Favorite Movie: Dead Poets Society Watches Movies: Too Often
- Favorite Actor: Ethan Hawke Favorite Actress: Winona Ryder
- Place I'd Like to Live in: California
- Favorite Vacation Spot: Florida
- Drinking Habits: I'm A Social Drinker
- Favorite Music: Alternative
- Favorite Activity: Sex!
- Opinion on Drugs: No Way
- Ideal Date: Anyhow
- Financial Status: Below The Red Line (Send WWIVsys Reg!)
- As far as Sex Goes?: I'm Going... Going... Gone!
- Summary: I'm The SysOp, Gotta Love Me!
-
- [PAUSE]D
-
-
- Revision A:
-
- Sorry about that, but it seems like there was a left out O_TRUNC sentence
- that was scrambling REGISTRY.DAT, thanks to IceFreezer to point to me that
- I forgot to change it at one place when I did the changes from FMD-32ß to
- FMD-32 Release Version. There was also a missing "un" which was v4.24 code,
- this has been replaced by usernum.
-
- If you are upgrading, just do step 7.
-
- Revision B:
-
- - Updated for WWIV v4.24
- - Fixed the newuser bug
- - Fixed the color of text bug
- - Fixed the "Alternative Worlds" is replace by your system name
-
- ┌┬═══════┐
- ││ Tests ││
- └═══════┴┘
-
- This modification has been tested on a virgin WWIV v4.24 source using
- Borland C++ v4.5
-
- ──────────────────────────────────────────────────────────────────────────────
- Legend
- ╔═══╤══════════════════┐
- │ + │ Add This Line │
- │ - │ Delete This Line │
- │ * │ Modify This Line │
- │ = │ Existing Line │
- └═══╧══════════════════╝
- ───[Step 1]────────────────────────────────────────────────────────────────────
-
- Load VARDEC.H and include this at the end of the file, just after inputpicrec:
-
-
- typedef struct {
- char realname[40],
- sex,
- aliases[81],
- job[81],
- sex_orientation[41],
- goal[81],
- food[81],
- tv_show[81],
- movie[81],
- actor[81],
- actress[81],
- live_in[81],
- vacation[81],
- music[81],
- drug[81],
- alcohol[81],
- date[81],
- finance[81],
- summary[162],
- age[10],
- movie_rate[50],
- activity[81],
- sexg[81];
- int filled;
- char res[98];
-
- } registry_rec;
-
- = /****************************************************************************/
- =
- = #include "instmsg.h"
- =
- = /****************************************************************************/
- =
- = #ifndef bbsmalloc
-
- ───[Step 2]────────────────────────────────────────────────────────────────────
-
- Load COM.C and look for the following lines:
-
- = case 20:
- = if (echo)
- = ptime();
- = if (menu_on() && rip_pause) {
- = pausescr();
- = }
- = break;
- = case 18:
- = if (echo)
- * look_at_registry();
- = break;
- = case 25:
- = thisuser.sysstatus ^= sysstatus_pause_on_page;
- = break;
- = }
-
- Then add the following 2 functions at the end of the file;
- (You might already have them from other of our modifications)
-
- void litebar(char *fmt, ...)
- {
- va_list ap;
- char s[512], s2[250];
-
- va_start(ap, fmt);
- vsprintf(s, fmt, ap);
- va_end(ap);
-
- if (okansi())
- {
- npr("\x1B[0;1m%s\r\n", charstr(strlen(s)+6, '▄'));
- sprintf(s2, "\x1B[0;34;47m ∙ %s ∙ \x1B[40m", stripcolors(s));
- pl(s2);
- npr("\x1B[0;1;30m%s\r\n", charstr(strlen(s)+6, '▀'));
- } else
- pl(s);
- ansic(0);
- }
-
- void litebar3(char *fmt, ...)
- {
- int i;
- va_list ap;
- char s[512], s1[512];
-
- va_start(ap, fmt);
- vsprintf(s, fmt, ap);
- va_end(ap);
-
- i=(74-strlen(s))/2;
- if (okansi())
- {
- sprintf(s1,"%s%s%s",charstr(i,' '),stripcolors(s),charstr(i,' '));
- npr("\x1B[0;1;36m%s\r\n",charstr(strlen(s1)+4,'▄'));
- npr("\x1B[0;30;46m ∙%s∙ \x1B[40m\r\n",s1);
- npr("\x1B[0;1;30m%s\r\n",charstr(strlen(s1)+4,'▀'));
- } else {
- npr("%s%s\r\n", charstr(i,' '), s);
- }
- ansic(0);
- }
-
- ───[Step 3]────────────────────────────────────────────────────────────────────
-
- Load MISCCMD.C and copy the following functions at the end of the file:
-
- void fill_registry(void)
- {
- int i, i2, f;
- char s[81];
- registry_rec r;
-
- prt(7, "Creating registry data file... ");
- sprintf(s,"%sREGISTRY.DAT",syscfg.datadir);
- f=sh_open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
- i2=number_userrecs();
- for (i=1; i<=i2; i++) {
- npr("%-3d", i);
- sh_lseek(f,(long)(i-1)*sizeof(registry_rec),SEEK_SET);
- r.realname[0]=0;
- r.sex=' ';
- r.aliases[0]=0;
- r.job[0]=0;
- r.sex_orientation[0]=0;
- r.goal[0]=0;
- r.food[0]=0;
- r.tv_show[0]=0;
- r.movie[0]=0;
- r.actor[0]=0;
- r.actress[0]=0;
- r.live_in[0]=0;
- r.vacation[0]=0;
- r.music[0]=0;
- r.drug[0]=0;
- r.alcohol[0]=0;
- r.date[0]=0;
- r.finance[0]=0;
- r.summary[0]=0;
- r.movie_rate[0]=0;
- r.age[0]=0;
- r.sexg[0]=0;
- r.activity[0]=0;
- r.filled=0;
- sh_lseek(f,(long)(i-1)*sizeof(registry_rec),SEEK_SET);
- sh_write(f,(void *)&r,sizeof(registry_rec));
- backspace();
- backspace();
- backspace();
- }
- pl("1Done!");
- nl();
- sh_close(f);
- }
-
- void enter_info(void)
- {
- int f;
- char s[81];
- registry_rec r;
-
- sprintf(s,"%sREGISTRY.DAT",syscfg.datadir);
- f=sh_open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
- sh_lseek(f,(long)(usernum-1)*sizeof(registry_rec),SEEK_SET);
- sh_read(f,(void *)&r,sizeof(registry_rec));
- if (r.filled==1) {
- nl();
- pl("6Registry already filled! Use the edit function.");
- nl();
- pausescr();
- sh_close(f);
- return;
- }
- litebar3("%s Registry.", syscfg.systemname);
- ansic(0);
- nl();
- pl("You will now be prompted to enter assorted information for your entry");
- pl("into the Registry Database. If you prefer not to answer certain");
- pl("questions for personal reasons, type \"N/A\" (for not available). If you");
- pl("leave the entry questionnaire before completing it all, it will not be");
- pl("SAVED (you may enter X to exit the questionnaire).");
- nl();
- pl("After you complete your entry, you will be able to edit any part of it");
- pl("at any time. Feel free to update your Information as frequently as you");
- pl("wish.");
- nl();
- pl("1Please Enter your real name:");
- mpl(39);
- inputl(r.realname, 39);
- nl();
- if (r.realname[0]==0)
- strcpy(r.realname, "N/A");
- pl("1What sex are you (M/F):");
- mpl(1);
- r.sex=onek("MF");
- nl();
- pl("1And what is your age?");
- mpl(3);
- input(r.age, 3);
- nl();
- if (r.age[0]==0)
- strcpy(r.age, "N/A");
- pl("1What other handles, nicknames, or aliases do you go by?");
- mpl(40);
- inputl(r.aliases, 40);
- nl();
- if (r.aliases[0]==0)
- strcpy(r.aliases, "N/A");
- pl("1What do you do for a Living (Job, Studies) ?");
- mpl(40);
- inputl(r.job, 40);
- nl();
- if (r.job[0]==0)
- strcpy(r.job, "N/A");
- pl("1What is your sexual orientation?");
- mpl(20);
- inputl(r.sex_orientation, 20);
- nl();
- if (r.sex_orientation[0]==0)
- strcpy(r.sex_orientation, "N/A");
- pl("1What are your Goals in Life?");
- mpl(40);
- inputl(r.goal, 40);
- nl();
- if (r.goal[0]==0)
- strcpy(r.goal, "N/A");
- pl("1What is your favorite kind of food?");
- mpl(40);
- inputl(r.food, 40);
- nl();
- if (r.food[0]==0)
- strcpy(r.food, "N/A");
- pl("1What is (are) your favorite TV show(s)?");
- mpl(40);
- inputl(r.tv_show, 40);
- nl();
- if (r.tv_show[0]==0)
- strcpy(r.tv_show, "N/A");
- pl("1What is your favorite movie?");
- mpl(40);
- inputl(r.movie, 40);
- nl();
- if (r.movie[0]==0)
- strcpy(r.movie, "N/A");
- pl("1How often do you watch movies?");
- mpl(40);
- inputl(r.movie_rate, 40);
- nl();
- if (r.movie_rate[0]==0)
- strcpy(r.movie_rate, "N/A");
- pl("1Who is your favorite actor?");
- mpl(40);
- inputl(r.actor, 40);
- nl();
- if (r.actor[0]==0)
- strcpy(r.actor, "N/A");
- pl("1Who is your favorite actress?");
- mpl(40);
- inputl(r.actress, 40);
- nl();
- if (r.actress[0]==0)
- strcpy(r.actress, "N/A");
- pl("1Where would be your favorite place to live?");
- mpl(40);
- inputl(r.live_in, 40);
- nl();
- if (r.live_in[0]==0)
- strcpy(r.live_in, "N/A");
- pl("1What is your favorite vacation spot?");
- mpl(40);
- inputl(r.vacation, 40);
- nl();
- if (r.vacation[0]==0)
- strcpy(r.vacation, "N/A");
- pl("1What is your Favorite Kind of Music?");
- mpl(40);
- inputl(r.music, 40);
- nl();
- if (r.music[0]==0)
- strcpy(r.music, "N/A");
- pl("1What is your opinion on drugs?");
- mpl(40);
- inputl(r.drug, 40);
- nl();
- if (r.drug[0]==0)
- strcpy(r.drug, "N/A");
- pl("1What are your drinking habits?");
- mpl(40);
- inputl(r.alcohol, 40);
- nl();
- if (r.alcohol[0]==0)
- strcpy(r.alcohol, "N/A");
- pl("1What is your ideal date?");
- mpl(40);
- inputl(r.date, 40);
- nl();
- if (r.date[0]==0)
- strcpy(r.date, "N/A");
- pl("1What is your favorite activity?");
- mpl(40);
- inputl(r.activity, 40);
- nl();
- if (r.activity[0]==0)
- strcpy(r.activity, "N/A");
- pl("1What is your financial status?");
- mpl(40);
- inputl(r.finance, 40);
- nl();
- if (r.finance[0]==0)
- strcpy(r.finance, "N/A");
- pl("1And as far as Sex Goes?");
- mpl(40);
- inputl(r.sexg, 40);
- nl();
- if (r.sexg[0]==0)
- strcpy(r.sexg, "N/A");
- pl("1Ok, now you can enter a Brief (39 characters max.) summary of yourself for");
- pl("1others to see in the directory (option \"D\" from the Registry Menu).");
- nl();
- mpl(39);
- inputl(r.summary, 39);
- nl();
- if (r.sexg[0]==0)
- strcpy(r.sexg, "N/A");
- r.filled=1;
- nl();
- pl("3Ok, your entry has been added to the database.");
- pl("3Thanks for your participation!");
- nl();
- pausescr();
- sh_lseek(f,(long)(usernum-1)*sizeof(registry_rec),SEEK_SET);
- if (!hangup)
- sh_write(f,(void *)&r,sizeof(registry_rec));
- sh_close(f);
- }
-
- void see_info(int un)
- {
- int f, c1;
- char s[81];
- registry_rec r;
- userrec u;
-
- c1=thisuser.colors[0];
- thisuser.colors[0]=15;
- nl();
- prt(1, "Reading Informations...");
- sprintf(s,"%sREGISTRY.DAT", syscfg.datadir);
- f=sh_open1(s,O_RDONLY | O_BINARY);
- sh_lseek(f,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
- sh_read(f,(void *)&r,sizeof(registry_rec));
- if (r.filled==0) {
- nl();
- pl("1Sorry, but that user haven't filled his registry yet!");
- nl();
- pausescr();
- sh_close(f);
- thisuser.colors[0]=c1;
- return;
- }
- read_user(un, &u);
- outchr(12);
- litebar3("%s On-Line User Lookup", syscfg.systemname);
- nl();
- npr("0Real Name3: 1%.17s 0Sex3: 1%c 0Age3: 1%s 0Aliases3: 1%.18s\r\n", r.realname, r.sex, r.age, r.aliases);
- npr("0Makes a Living as3: 1 %s\r\n", r.job);
- npr("0Sexual Orientation is3:1 %s\r\n", r.sex_orientation);
- npr("0Future Goals in Life3: 1%s\r\n", r.goal);
- npr("0Favorite Kind of Food3:1 %s\r\n", r.food);
- npr("0Favorite TV Show(s)3: 1%s\r\n", r.tv_show);
- npr("0Favorite Movie3:1 %.30s 0Watches Movies3: 1%.30s\r\n", r.movie, r.movie_rate);
- npr("0Favorite Actor3: 1%.30s 0Favorite Actress3:1 %.30s\r\n", r.actor, r.actress);
- npr("0Place I'd Like to Live in3: 1%s\r\n", r.live_in);
- npr("0Favorite Vacation Spot3: 1%s\r\n", r.vacation);
- npr("0Drinking Habits3: 1%s\r\n", r.alcohol);
- npr("0Favorite Music3: 1%s\r\n", r.music);
- npr("0Favorite Activity3: 1%s\r\n", r.activity);
- npr("0Opinion on Drugs3: 1%s\r\n", r.drug);
- npr("0Ideal Date3: 1%s\r\n", r.date);
- npr("0Financial Status3: 1%s\r\n", r.finance);
- npr("0As far as Sex Goes?3: 1%s\r\n", r.sexg);
- npr("0Summary3: 1%s\r\n",r.summary);
- nl();
- sh_close(f);
- pausescr();
- thisuser.colors[0]=c1;
- }
-
- void look_at_registry(void)
- {
- char s[81], xl[81], cl[81], atr[81], cc;
- unsigned un;
-
- savel(cl, atr, xl, &cc);
- nln(2);
- prt(1,"See the registery of which user?");
- nl();
- outstr(":");
- mpl(30);
- input(s,30);
- un=finduser1(s);
- if (un>0)
- see_info(un);
- else {
- nl();
- pl(get_string(8));
- nl();
- }
- restorel(cl, atr, xl, &cc);
- }
-
- void registry_menu(void)
- {
- int done=0;
- char ch;
-
- do {
- outchr(12);
- litebar("User Registry Menu");
- nln(2);
- pl("7[1E7]nter your registry informations.");
- pl("7[1R7]evise your registry informations.");
- pl("7[1L7]ook-up another user's entry.");
- pl("7[1D7]irectory of available registries.");
- pl("7[1Q7]uit.");
- nln(2);
- prt(2,"Selection: ");
- mpl(1);
- ch=onek("QERLD");
- switch (ch)
- {
- case 'Q': done=1; break;
- case 'L': look_at_registry(); break;
- case 'E': enter_info(); break;
- case 'R': revise_entry(); break;
- case 'D': registry_directory(); break;
- }
- } while (!done && !hangup);
- }
-
- int check_registry(int un)
- {
- char s[81];
- int f;
- registry_rec r;
-
- sprintf(s,"%sREGISTRY.DAT", syscfg.datadir);
- f=sh_open1(s,O_RDONLY | O_BINARY);
- sh_lseek(f,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
- sh_read(f,(void *)&r,sizeof(registry_rec));
- sh_close(f);
- if (r.filled==1)
- return(0);
- else
- return(1);
- }
-
- void registry_directory(void)
- {
- int i, f;
- char s[81], s1[81];
- registry_rec r;
- userrec u;
-
- sprintf(s,"%sREGISTRY.DAT", syscfg.datadir);
- f=sh_open1(s,O_RDONLY | O_BINARY);
- outchr(12);
- litebar3("User Directory");
- nl();
- for (i=0; i<status.users; i++) {
- read_user(smallist[i].number, &u);
- strcpy(s1, u.name);
- sh_lseek(f,(long)(smallist[i].number-1)*sizeof(registry_rec),SEEK_SET);
- sh_read(f,(void *)&r,sizeof(registry_rec));
- if (r.filled) {
- npr("1%.30s7%s0%-39.39s\r\n", s1, charstr(40-strlen(s1), '.'), r.summary);
- }
- }
- nl();
- pausescr();
- sh_close(f);
-
- }
-
- void revise_entry(void)
- {
- int f, c1;
- char s[81], ch;
- registry_rec r;
-
- sprintf(s,"%sREGISTRY.DAT",syscfg.datadir);
- f=sh_open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
- sh_lseek(f,(long)(usernum-1)*sizeof(registry_rec),SEEK_SET);
- sh_read(f,(void *)&r,sizeof(registry_rec));
- if (r.filled==0) {
- nl();
- pl("6Registry not filled! Use the enter informations function.");
- nl();
- pausescr();
- sh_close(f);
- return;
- }
- c1=thisuser.colors[0];
- thisuser.colors[0]=15;
- do
- {
- outchr(12);
- 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);
- npr("7[1E7] 0Makes a Living as3: 1 %s\r\n", r.job);
- npr("7[1F7] 0Sexual Orientation is3:1 %s\r\n", r.sex_orientation);
- npr("7[1G7] 0Future Goals in Life3: 1%s\r\n", r.goal);
- npr("7[1H7] 0Favorite Kind of Food3:1 %s\r\n", r.food);
- npr("7[1I7] 0Favorite TV Show(s)3: 1%s\r\n", r.tv_show);
- npr("7[1J7] 0Favorite Movie3:1 %.30s 7[1K7] 0Watches Movies3: 1%.30s\r\n", r.movie, r.movie_rate);
- npr("7[1L7] 0Favorite Actor3: 1%.30s 7[1M7] 0Favorite Actress3:1 %.30s\r\n", r.actor, r.actress);
- npr("7[1N7] 0Place I'd Like to Live in3: 1%s\r\n", r.live_in);
- npr("7[1O7] 0Favorite Vacation Spot3: 1%s\r\n", r.vacation);
- npr("7[1P7] 0Drinking Habits3: 1%s\r\n", r.alcohol);
- npr("7[1Q7] 0Favorite Music3: 1%s\r\n", r.music);
- npr("7[1R7] 0Favorite Activity3: 1%s\r\n", r.activity);
- npr("7[1S7] 0Opinion on Drugs3: 1%s\r\n", r.drug);
- npr("7[1T7] 0Ideal Date3: 1%s\r\n", r.date);
- npr("7[1U7] 0Financial Status3: 1%s\r\n", r.finance);
- npr("7[1V7] 0As far as Sex Goes?3: 1%s\r\n", r.sexg);
- npr("7[1W7] 0Summary3: 1%s\r\n",r.summary);
- nl();
- prt(2, "Selection (X=Quit): ");
- mpl(1);
- ch=onek("ABCDEFGHIJKLMNOPQRSTUVWX");
- switch (ch)
- {
- case 'A':
- nl();
- pl("1What is your real name?");
- mpl(39);
- inputl(r.realname, 39);
- nl();
- if (r.realname[0]==0)
- strcpy(r.realname, "N/A");
- break;
- case 'B':
- nl();
- pl("1What is your gender (M/F) ?");
- mpl(1);
- r.sex=onek("MF");
- nl();
- break;
- case 'C':
- nl();
- pl("1What is your age?");
- mpl(3);
- input(r.age, 3);
- nl();
- if (r.age[0]==0)
- strcpy(r.age, "N/A");
- break;
- case 'D':
- nl();
- pl("1What are your other aliases?");
- mpl(40);
- inputl(r.aliases, 40);
- nl();
- if (r.aliases[0]==0)
- strcpy(r.aliases, "N/A");
- break;
- case 'E':
- nl();
- pl("1What is your job?");
- mpl(40);
- inputl(r.job, 40);
- nl();
- if (r.job[0]==0)
- strcpy(r.job, "N/A");
- break;
- case 'F':
- nl();
- pl("1What is your sexual orientation?");
- mpl(20);
- inputl(r.sex_orientation, 20);
- nl();
- if (r.sex_orientation[0]==0)
- strcpy(r.sex_orientation, "N/A");
- break;
- case 'G':
- nl();
- pl("1What are your future goals in life?");
- mpl(40);
- inputl(r.goal, 40);
- nl();
- if (r.goal[0]==0)
- strcpy(r.goal, "N/A");
- break;
- case 'H':
- nl();
- pl("1What is your favorite kind of food?");
- mpl(40);
- inputl(r.food, 40);
- nl();
- if (r.food[0]==0)
- strcpy(r.food, "N/A");
- break;
- case 'I':
- nl();
- pl("1What is your favorite TV show?");
- mpl(40);
- inputl(r.tv_show, 40);
- nl();
- if (r.tv_show[0]==0)
- strcpy(r.tv_show, "N/A");
- break;
- case 'J':
- nl();
- pl("1What is your favorite movie?");
- mpl(40);
- inputl(r.movie, 40);
- nl();
- if (r.movie[0]==0)
- strcpy(r.movie, "N/A");
- break;
- case 'K':
- nl();
- pl("1How often do you watch movies?");
- mpl(40);
- inputl(r.movie_rate, 40);
- nl();
- if (r.movie_rate[0]==0)
- strcpy(r.movie_rate, "N/A");
- break;
- case 'L':
- nl();
- pl("1Who is your favorite actor?");
- mpl(40);
- inputl(r.actor, 40);
- nl();
- if (r.actor[0]==0)
- strcpy(r.actor, "N/A");
- break;
- case 'M':
- nl();
- pl("1Who is your favorite actress?");
- mpl(40);
- inputl(r.actress, 40);
- nl();
- if (r.actress[0]==0)
- strcpy(r.actress, "N/A");
- break;
- case 'N':
- nl();
- pl("1Where would you like to live?");
- mpl(40);
- inputl(r.live_in, 40);
- nl();
- if (r.live_in[0]==0)
- strcpy(r.live_in, "N/A");
- break;
- case 'O':
- nl();
- pl("1Where is your favorite vacation spot?");
- mpl(40);
- inputl(r.vacation, 40);
- nl();
- if (r.vacation[0]==0)
- strcpy(r.vacation, "N/A");
- break;
- case 'P':
- nl();
- pl("1What are your drinking habits?");
- mpl(40);
- inputl(r.alcohol, 40);
- nl();
- if (r.alcohol[0]==0)
- strcpy(r.alcohol, "N/A");
- break;
- case 'Q':
- nl();
- pl("1What is your favorite music?");
- mpl(40);
- inputl(r.music, 40);
- nl();
- if (r.music[0]==0)
- strcpy(r.music, "N/A");
- break;
- case 'R':
- nl();
- pl("1What is your favorite activity?");
- mpl(40);
- inputl(r.activity, 40);
- nl();
- if (r.activity[0]==0)
- strcpy(r.activity, "N/A");
- break;
- case 'S':
- nl();
- pl("1What is your opinion on drugs?");
- mpl(40);
- inputl(r.drug, 40);
- nl();
- if (r.drug[0]==0)
- strcpy(r.drug, "N/A");
- break;
- case 'T':
- nl();
- pl("1What is your ideal date?");
- mpl(40);
- inputl(r.date, 40);
- nl();
- if (r.date[0]==0)
- strcpy(r.date, "N/A");
- break;
- case 'U':
- nl();
- pl("1What is your financial status?");
- mpl(40);
- inputl(r.finance, 40);
- nl();
- if (r.finance[0]==0)
- strcpy(r.finance, "N/A");
- break;
- case 'V':
- nl();
- pl("1As far as Sex Goes?");
- mpl(40);
- inputl(r.sexg, 40);
- nl();
- if (r.sexg[0]==0)
- strcpy(r.sexg, "N/A");
- break;
- case 'W':
- nl();
- pl("1Summary?");
- mpl(39);
- inputl(r.summary, 39);
- nl();
- if (r.summary[0]==0)
- strcpy(r.summary, "N/A");
- break;
- case 'X':
- sh_lseek(f,(long)(usernum-1)*sizeof(registry_rec),SEEK_SET);
- sh_write(f,(void *)&r,sizeof(registry_rec));
- sh_close(f);
- thisuser.colors[0]=c1;
- return;
- }
- } while (!hangup);
- thisuser.colors[0]=c1;
- }
-
-
- ───[Step 4]────────────────────────────────────────────────────────────────────
-
- Load LILO.C and do the following change to void logon
-
-
- = prt(3,get_string(378));
- = nl();
- = }
- + if (check_registry(usernum)) {
- + pl("\77By the way, you haven't filled out your Registry entry yet...");
- + pl("7Just select \"1/I7\" from the MAIN menu to enter the Registry!");
- + }
- + nl();
- = if ((incom) || (sysop1()))
- = broadcast(get_string(1172));
-
-
- ───[Step 5]────────────────────────────────────────────────────────────────────
-
- Load MMENU.C and do the following modifications to function mainmenu:
-
- = sysoplog(get_stringx(1,12));
- = text_edit();
- = }
- + if (strcmp(s, "RESETREGISTRY")==0)
- + fill_registry();
- = if ((strcmp(s,"UEDIT")==0) || (strcmp(s,"UE")==0)) {
-
- and lower...
-
- = if (strcmp(s,"/O")==0) {
- = if (numbatchdl!=0) {
- = nl();
- = outstr(get_string(1324));
- = if (ny())
- = batchdl(1);
- = else
- = hangup=1;
- = } else
- = hangup=1;
- = }
- + if (strcmp(s,"/I")==0)
- + registry_menu();
- = if (strcmp(s,"/R")==0) {
- = if (using_modem) {
- = rip = rip_check();
- = if (rip_on()) {
-
- ───[Step 6]────────────────────────────────────────────────────────────────────
-
- Load UEDIT.C and do the following change to function deluser:
-
- =void deluser(int un)
- ={
- = userrec u;
- = int i,i1,f,n;
- = mailrec m;
- * char fn[81], s[81];
- = votingrec v;
- = voting_response vr;
- + registry_rec r;
- =
- = read_user(un,&u);
- = if ((u.inact & inact_deleted)==0) {
- + sprintf(s,"%sREGISTRY.DAT",syscfg.datadir);
- + f=sh_open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
- + sh_lseek(f,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
- + sh_read(f,(void *)&r,sizeof(registry_rec));
- + r.realname[0]=0;
- + r.sex=' ';
- + r.aliases[0]=0;
- + r.job[0]=0;
- + r.sex_orientation[0]=0;
- + r.goal[0]=0;
- + r.food[0]=0;
- + r.tv_show[0]=0;
- + r.movie[0]=0;
- + r.actor[0]=0;
- + r.actress[0]=0;
- + r.live_in[0]=0;
- + r.vacation[0]=0;
- + r.music[0]=0;
- + r.drug[0]=0;
- + r.alcohol[0]=0;
- + r.date[0]=0;
- + r.finance[0]=0;
- + r.summary[0]=0;
- + r.movie_rate[0]=0;
- + r.age[0]=0;
- + r.sexg[0]=0;
- + r.activity[0]=0;
- + r.filled=0;
- + sh_lseek(f,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
- + sh_write(f,(void *)&r,sizeof(registry_rec));
- + sh_close(f);
- = rsm(un,&u,0);
- = dsr(u.name);
-
- ───[Step 7]────────────────────────────────────────────────────────────────────
-
- Load NEWUSER.C and replace function find_new_usernum:
-
- int find_new_usernum(userrec *u, unsigned long *qsc)
- {
- char s[81], s1[81];
- int f, f1, nu, un,n;
- userrec tu;
- registry_rec r;
-
- sprintf(s,"%sUSER.LST",syscfg.datadir);
-
- f=-1;
- for (n=0; (f<0) && (n<20); n++) {
- f=sh_open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
- if (f<0) {
- wait1(2);
- }
- }
- if (f<0)
- return(-1);
-
- nu=((int) (filelength(f)/syscfg.userreclen)-1);
- sh_lseek(f, syscfg.userreclen, SEEK_SET);
- un=1;
-
- read_status();
- if (nu == status.users) {
- un=nu+1;
- sh_lseek(f, ((long) syscfg.userreclen) * ((long) un), SEEK_SET);
- sh_write(f, (void *)u, syscfg.userreclen);
- sh_close(f);
- write_qscn(un, qsc, 0);
- isr(un, u->name);
- sprintf(s1,"%sREGISTRY.DAT",syscfg.datadir);
- f1=sh_open(s1,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
- sh_lseek(f1,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
- r.realname[0]=0;
- r.sex=' ';
- r.aliases[0]=0;
- r.job[0]=0;
- r.sex_orientation[0]=0;
- r.goal[0]=0;
- r.food[0]=0;
- r.tv_show[0]=0;
- r.movie[0]=0;
- r.actor[0]=0;
- r.actress[0]=0;
- r.live_in[0]=0;
- r.vacation[0]=0;
- r.music[0]=0;
- r.drug[0]=0;
- r.alcohol[0]=0;
- r.date[0]=0;
- r.finance[0]=0;
- r.summary[0]=0;
- r.movie_rate[0]=0;
- r.age[0]=0;
- r.sexg[0]=0;
- r.activity[0]=0;
- r.filled=0;
- sh_lseek(f1,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
- sh_write(f1,(void *)&r,sizeof(registry_rec));
- sh_close(f1);
- } else {
-
- while (un<=nu) {
- if (un%25 == 0) {
- f=sh_close(f);
- for (n=0; (f<0) && (n<20); n++) {
- f=sh_open(s,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
- if (f<0) {
- wait1(2);
- }
- }
- if (f<0)
- return(-1);
- sh_lseek(f, ((long) syscfg.userreclen) * ((long) un), SEEK_SET);
- nu=((int) (filelength(f)/syscfg.userreclen)-1);
- }
-
- sh_read(f, (void *)&tu, syscfg.userreclen);
-
- if (tu.inact & inact_deleted) {
- sh_lseek(f, ((long) syscfg.userreclen) * ((long) un), SEEK_SET);
- sh_write(f, (void *)u, syscfg.userreclen);
- sh_close(f);
- write_qscn(un, qsc, 0);
- isr(un, u->name);
- sprintf(s1,"%sREGISTRY.DAT",syscfg.datadir);
- f1=sh_open(s1,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
- sh_lseek(f1,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
- r.realname[0]=0;
- r.sex=' ';
- r.aliases[0]=0;
- r.job[0]=0;
- r.sex_orientation[0]=0;
- r.goal[0]=0;
- r.food[0]=0;
- r.tv_show[0]=0;
- r.movie[0]=0;
- r.actor[0]=0;
- r.actress[0]=0;
- r.live_in[0]=0;
- r.vacation[0]=0;
- r.music[0]=0;
- r.drug[0]=0;
- r.alcohol[0]=0;
- r.date[0]=0;
- r.finance[0]=0;
- r.summary[0]=0;
- r.movie_rate[0]=0;
- r.age[0]=0;
- r.sexg[0]=0;
- r.activity[0]=0;
- r.filled=0;
- sh_lseek(f1,(long)(un-1)*sizeof(registry_rec),SEEK_SET);
- sh_write(f1,(void *)&r,sizeof(registry_rec));
- sh_close(f1);
- return(un);
- } else
- un++;
- }
- }
-
- if (un <= syscfg.maxusers) {
- sh_lseek(f, ((long) syscfg.userreclen) * ((long) un), SEEK_SET);
- sh_write(f, (void *)u, syscfg.userreclen);
- sh_close(f);
- write_qscn(un, qsc, 0);
- isr(un, u->name);
- return(un);
- } else {
- sh_close(f);
- return(-1);
- }
- }
-
-
- Then lower in NEWUSER.C
-
- = input(s,8);
- = if (strcmp(s,thisuser.pw)==0)
- = ok=1;
- = } while ((!ok) && (!hangup));
- = checkit=0;
- + nl();
- + pl("9The user registry is informations about yourself that everyone will be");
- + pl("9able to view on-line.");
- + nl();
- + pl("1Would you like to enter your registry informations? ");
- + if (yn())
- + enter_info();
- + nl();
- = if (incom) {
- = if (printfile("FEEDBACK"))
-
- ───[Step 8]────────────────────────────────────────────────────────────────────
-
- You now need to do MAKE FCNS, compile & enjoy, you now have a full registry
- system on your BBS. Tell your user and update your menus. First thing to do
- when you'll put your board up is to do a //RESETREGISTRY, that should be the
- only time you need to use that, it will create the empty registry fields.
-
- /I is to acces the registry menu and CTRL-R anywhere on the
- BBS is to look at other people registry.
-
-
- French Proverb: L'amitié est plus forte que l'amour.
-
- For comments, bug report and suggestion, e-mail at the following address:
-
- Nicolas LeBlanc 2@20302.WWIVnet (aka Spotnick)
- -> spotnick@gamemaster.qc.ca
- Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
- -> martin.bourdages@radio.magicnet.com
-
- => French Mod Division Support Sub <=
- SubType: FMD
- Host: @20302 (WWIVnet)
- Scan sublist for other networks
-
- Read PRODUCTS.FMD for the full list of our support systems.
-
- ───[EOF]──────────────────────────────────────────────────────────────────────
-