home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
EVENTS
/
FVB10.ZIP
/
FMD-06.MOD
< prev
next >
Wrap
Text File
|
1995-04-17
|
7KB
|
243 lines
┌┬─── ── ─ ─ ── ───────────────────────────────────────────────────┬─ ∙∙
││ Alternative Worlds Presents │
└┼─────────────────────────────────────────────────────────────────────┐
││ Mod Name » FMD-06.MOD (Release Version) │∙
││ Difficulty » █▒▒▒▒▒▒▒▒▒▒ (1/10) │:
││ WWIV Version » 4.23 ││
││ Date Affected » 02/01/95 ││
:│ Files Affected » BBS.C / LILO.C / VOTEEDIT.C / MISCCMD.C / VARS.H ││
∙│ Description » Run FMD Voting Booth From Inside WWIV ││
└─────────────────────────────────────────────────────────────────────┼┐
│ 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.
──────────────────────────────────────────────────────────────────────────────
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();
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");
#ifdef WWIV424
extern_prog(s,EFLAG_SHRINK|EFLAG_COMIO|EFLAG_INTERNAL|EFLAG_TOPSCREEN);
#else
full_external(s,0,1);
#endif
}
}
Add the following function just after void vote:
void enter_vote(void)
{
char s[81];
int i;
create_chain_file();
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");
#ifdef WWIV424
extern_prog(s,EFLAG_SHRINK|EFLAG_COMIO|EFLAG_INTERNAL|EFLAG_TOPSCREEN);
#else
full_external(s,0,1);
#endif
}
}
───[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");
#ifdef WWIV424
extern_prog(s1,EFLAG_SHRINK|EFLAG_COMIO|EFLAG_INTERNAL|EFLAG_TOPSCREEN);
#else
full_external(s1,0,1);
#endif
topdata=i;
}
void voteprint(void)
{
char s[81];
create_chain_file();
if (instance>1)
sprintf(s,"VOTE.EXE CHAIN.%3.3d /V",instance);
else
strcpy(s,"VOTE.EXE CHAIN.TXT /V");
#ifdef WWIV424
extern_prog(s,EFLAG_SHRINK|EFLAG_COMIO|EFLAG_INTERNAL);
#else
full_external(s,0,1);
#endif
}
───[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. If you are running WWIV
v4.24, you will need to add "#define WWIV424" at the end of VARS.H to be sure
it will select the v4.24 code, or you can delete the v4.24 and #define, #else,
#endif lines if you feel confident to do so.
French Proverb: Pierre qui roule n'amasse pas mousse.
For comments, bug report and suggestion, e-mail at the following address:
Spotnick 1@20397.WWIVnet Dark Shadow 1@20305.WWIVnet
SysOp of Alternative Worlds SysOp of French Mod Division HQ
=> French Mod Division Support Sub <=
SubType: ESE
Host: @20397 (WWIVnet) / @5497 Others
───[EOF]──────────────────────────────────────────────────────────────────────