home *** CD-ROM | disk | FTP | other *** search
- Nicolas Leblanc #2 @20302
- Mon Jul 31 20:51:32 1995
- ┌┬─── ── ─ ─ ── ───────────────────────────────────────────────────┬─ ∙∙
- ││ Alternative Worlds Presents │
- └┼─────────────────────────────────────────────────────────────────────┐
- ││ Mod Name » FMD-06b.MOD │∙
- ││ Difficulty » █▒▒▒▒▒▒▒▒▒▒ (1/10) │:
- ││ WWIV Version » 4.24 ││
- ││ Date Affected » 07/27/95 ││
- :│ Files Affected » MMENU.C / LILO.C / VOTEEDIT.C / MISCCMD.C / VARS.H ││
- ∙│ Description » Run FVB/FVBjr Inside WWIV - Remove WWIV Vote Sect. ││
- └─────────────────────────────────────────────────────────────────────┼┐
- │ A French Mod Division Release - (C) 1995 FMD Software ││
- ∙∙ ─┴─────────────────────────────────────────────────── ── ─ ─ ── ───└┘
-
-
- ┌┬══════════════════┐
- ││ Long Description ││
- └══════════════════┴┘
-
-
- This modification will rip off the internal WWIV voting functions to replace
- them by the external voting booth from French Mod Division. This will save
- you Dgroup space and will reduce the size of your BBS.EXE, and you will enjoy
- the voting booth system done by French Mod Division.
-
- Revision A:
-
- - Updated for WWIV v4.24
-
- Revision B:
-
- - Add more topscreen control, to avoid having the topscreen while in
- the voting booth.
-
- ┌┬═══════┐
- ││ 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 LILO.C and to the following change in void logon:
-
-
- = nscandate=thisuser.daten;
- = batchtime=0.0;
- = numbatchdl=numbatch=0;
- - i1=0;
- - for (i=0; i<20; i++) {
- - if (questused[i]) {
- - if (thisuser.votes[i]==0) {
- - i1=1;
- - }
- - }
- - }
- - if (restrict_vote & thisuser.restrict)
- - i1=0;
- - if (actsl<=syscfg.newusersl)
- - i1=0;
- -
- * if (live_user) {
- = nl();
- * enter_vote();
- = nl();
- = }
- = if ((incom) || (sysop1()))
- = broadcast(get_string(1172));
-
- ───[Step 2]────────────────────────────────────────────────────────────────────
-
- Load MISCCMD.C, and delete the following functions:
-
- - void print_quest(void);
- - int print_question(int i, int ii);
- - void vote_question(void);
-
- Then replace void vote with the following one:
-
- void vote(void)
- {
- char s[81];
- int i;
-
- create_chain_file();
- i=topdata;
- topdata=0;
- if (!(restrict_vote & thisuser.restrict)) {
- topscreen();
- if (instance>1)
- sprintf(s,"VOTE.EXE CHAIN.%3.3d /O",instance);
- else
- strcpy(s,"VOTE.EXE CHAIN.TXT /O");
- extern_prog(s,EFLAG_SHRINK|EFLAG_COMIO|EFLAG_INTERNAL|EFLAG_TOPSCREEN);
- }
- topdata=i;
- }
-
- Add the following function just after void vote:
-
- void enter_vote(void)
- {
- char s[81];
- int i;
-
- create_chain_file();
- i=topdata;
- topdata=0;
- if (!(restrict_vote & thisuser.restrict)) {
- topscreen();
- if (instance>1)
- sprintf(s,"VOTE.EXE CHAIN.%3.3d /L",instance);
- else
- strcpy(s,"VOTE.EXE CHAIN.TXT /L");
- extern_prog(s,EFLAG_SHRINK|EFLAG_COMIO|EFLAG_INTERNAL|EFLAG_TOPSCREEN);
- }
- topdata=i;
- }
-
- ───[Step 3]────────────────────────────────────────────────────────────────────
-
- Load UEDIT.C, and do the following changes to void uedit:
-
-
- = sh_lseek(f,((long) i) * sizeof(mailrec), SEEK_SET);
- = sh_read(f,(void *)(&m),sizeof(mailrec));
- = if (((m.tosys==0) && (m.touser==un)) ||
- = ((m.fromsys==0) && (m.fromuser==un))) {
- = delmail(f,i);
- = }
- = }
- = f=sh_close(f);
- = }
- - sprintf(fn,"%sVOTING.DAT",syscfg.datadir);
- - f=sh_open(fn,O_RDWR | O_BINARY, S_IREAD | S_IWRITE);
- - n=(int) (filelength(f) / sizeof(votingrec)) -1;
- - for (i=0; i<20; i++)
- - if (u.votes[i]) {
- - if (i<=n) {
- - sh_lseek(f,((long) i) * sizeof(votingrec), SEEK_SET);
- - sh_read(f,(void *)&v,sizeof(votingrec));
- - vr=v.responses[u.votes[i]-1];
- - vr.numresponses--;
- - v.responses[u.votes[i]-1]=vr;
- - sh_lseek(f,((long) i) * sizeof(votingrec), SEEK_SET);
- - sh_write(f,(void *)&v,sizeof(votingrec));
- - }
- - u.votes[i]=0;
- - }
- - f=sh_close(f);
- = write_user(un,&u);
- = }
- =}
-
- ───[Step 4]────────────────────────────────────────────────────────────────────
-
- Load VOTEEDIT.C and delete the following functions:
-
- - void print_quests(void);
- - void set_question(void);
-
- And replace the two following functions:
- void ivotes(void)
- {
- char s1[101];
- int i;
-
- i=topdata;
- topdata=0;
- topscreen();
- create_chain_file();
- if (instance>1)
- sprintf(s1,"VOTE.EXE CHAIN.%3.3d /S",instance);
- else
- strcpy(s1,"VOTE.EXE CHAIN.TXT /S");
- extern_prog(s1,EFLAG_SHRINK|EFLAG_COMIO|EFLAG_INTERNAL|EFLAG_TOPSCREEN);
- topdata=i;
- }
-
-
- void voteprint(void)
- {
- char s[81];
- int i;
-
- create_chain_file();
-
- i=topdata;
- topdata=0;
- topscreen();
- if (instance>1)
- sprintf(s,"VOTE.EXE CHAIN.%3.3d /V",instance);
- else
- strcpy(s,"VOTE.EXE CHAIN.TXT /V");
- extern_prog(s,EFLAG_SHRINK|EFLAG_COMIO|EFLAG_INTERNAL);
- topdata=i;
- }
-
-
-
- ───[Step 5]────────────────────────────────────────────────────────────────────
-
- Load XINIT.C and delete the following void:
-
- void read_voting(void);
-
- And delete the following line in void init:
-
- = xenviron[i1++]="PKNOFASTCHAR=Y";
- = xenviron[i1]=NULL;
- =
- - read_voting();
- =
- = if (syscfgovr.comflags & comflags_buffered_uart)
- = high_speed=1;
-
-
- ───[Step 6]────────────────────────────────────────────────────────────────────
-
- Load VARS.H and delete "questused[20]"
-
- = num_sys_list, oklevel, okmacro, okskey, ok_modem_stuff,
- * oldx, oldy, ooneuser, outcom,
- = restoring_shrink, save_dos, screenbottom, screenlen,
-
- ───[Step 7]────────────────────────────────────────────────────────────────────
-
- Compile the entire board (you need to rebuild FCNS.H), put VOTE.EXE in your
- main WWIV directory, and everything should work fine.
-
- French Proverb: Pierre qui roule n'amasse pas mousse.
-
- 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]──────────────────────────────────────────────────────────────────────
-