home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / EVENTS / FVBJR11.ZIP / FMD-06B.MOD < prev    next >
Text File  |  1995-07-27  |  7KB  |  257 lines

  1.  
  2.    ┌┬─── ──  ─   ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  3.    ││                    Alternative Worlds Presents                      │
  4.    └┼─────────────────────────────────────────────────────────────────────┐
  5.    ││ Mod Name       » FMD-06b.MOD                                        │∙
  6.    ││ Difficulty     » █▒▒▒▒▒▒▒▒▒▒ (1/10)                                 │:
  7.    ││ WWIV Version   » 4.24                                               ││
  8.    ││ Date Affected  » 07/27/95                                           ││
  9.    :│ Files Affected » MMENU.C / LILO.C / VOTEEDIT.C / MISCCMD.C / VARS.H ││
  10.    ∙│ Description    » Run FVB/FVBjr Inside WWIV - Remove WWIV Vote Sect. ││
  11.     └─────────────────────────────────────────────────────────────────────┼┐
  12.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  13. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─   ─  ── ───└┘
  14.  
  15.  
  16.  ┌┬══════════════════┐
  17.  ││ Long Description ││
  18.   └══════════════════┴┘
  19.  
  20.  
  21.    This modification will rip off the internal WWIV voting functions to replace
  22. them by the external voting booth from French Mod Division. This will save
  23. you Dgroup space and will reduce the size of your BBS.EXE, and you will enjoy
  24. the voting booth system done by French Mod Division.
  25.  
  26. Revision A:
  27.  
  28.  - Updated for WWIV v4.24
  29.  
  30. Revision B:
  31.  
  32.  - Add more topscreen control, to avoid having the topscreen while in
  33.    the voting booth.
  34.  
  35.  ┌┬═══════┐
  36.  ││ Tests ││
  37.   └═══════┴┘
  38.  
  39.   This modification has been tested on a virgin WWIV v4.24 source using
  40.   Borland C++ v4.5
  41.  
  42. ──────────────────────────────────────────────────────────────────────────────
  43.                                    Legend
  44.                           ╔═══╤══════════════════┐
  45.                           │ + │ Add This Line    │
  46.                           │ - │ Delete This Line │
  47.                           │ * │ Modify This Line │
  48.                           │ = │ Existing Line    │
  49.                           └═══╧══════════════════╝
  50. ───[Step 1]────────────────────────────────────────────────────────────────────
  51.  
  52. Load LILO.C and to the following change in void logon:
  53.  
  54.  
  55. =  nscandate=thisuser.daten;
  56. =  batchtime=0.0;
  57. =  numbatchdl=numbatch=0;
  58. -  i1=0;
  59. -  for (i=0; i<20; i++) {
  60. -    if (questused[i]) {
  61. -      if (thisuser.votes[i]==0) {
  62. -        i1=1;
  63. -      }
  64. -    }
  65. -  }
  66. -  if (restrict_vote & thisuser.restrict)
  67. -    i1=0;
  68. -  if (actsl<=syscfg.newusersl)
  69. -    i1=0;
  70. -
  71. *  if (live_user) {
  72. =    nl();
  73. *    enter_vote();
  74. =    nl();
  75. =  }
  76. =  if ((incom) || (sysop1()))
  77. =    broadcast(get_string(1172));
  78.  
  79. ───[Step 2]────────────────────────────────────────────────────────────────────
  80.  
  81.   Load MISCCMD.C, and delete the following functions:
  82.  
  83. - void print_quest(void);
  84. - int print_question(int i, int ii);
  85. - void vote_question(void);
  86.  
  87.   Then replace void vote with the following one:
  88.  
  89. void vote(void)
  90. {
  91.   char s[81];
  92.   int i;
  93.  
  94.   create_chain_file();
  95.   i=topdata;
  96.   topdata=0;
  97.   if (!(restrict_vote & thisuser.restrict)) {
  98.     topscreen();
  99.     if (instance>1)
  100.       sprintf(s,"VOTE.EXE CHAIN.%3.3d /O",instance);
  101.     else
  102.       strcpy(s,"VOTE.EXE CHAIN.TXT /O");
  103.     extern_prog(s,EFLAG_SHRINK|EFLAG_COMIO|EFLAG_INTERNAL|EFLAG_TOPSCREEN);
  104.   }
  105.   topdata=i;
  106. }
  107.  
  108. Add the following function just after void vote:
  109.  
  110. void enter_vote(void)
  111. {
  112.   char s[81];
  113.   int i;
  114.  
  115.   create_chain_file();
  116.   i=topdata;
  117.   topdata=0;
  118.   if (!(restrict_vote & thisuser.restrict)) {
  119.     topscreen();
  120.     if (instance>1)
  121.       sprintf(s,"VOTE.EXE CHAIN.%3.3d /L",instance);
  122.     else
  123.       strcpy(s,"VOTE.EXE CHAIN.TXT /L");
  124.     extern_prog(s,EFLAG_SHRINK|EFLAG_COMIO|EFLAG_INTERNAL|EFLAG_TOPSCREEN);
  125.   }
  126.   topdata=i;
  127. }
  128.  
  129. ───[Step 3]────────────────────────────────────────────────────────────────────
  130.  
  131.   Load UEDIT.C, and do the following changes to void uedit:
  132.  
  133.  
  134. =        sh_lseek(f,((long) i) * sizeof(mailrec), SEEK_SET);
  135. =        sh_read(f,(void *)(&m),sizeof(mailrec));
  136. =        if (((m.tosys==0) && (m.touser==un)) ||
  137. =            ((m.fromsys==0) && (m.fromuser==un))) {
  138. =          delmail(f,i);
  139. =        }
  140. =      }
  141. =      f=sh_close(f);
  142. =    }
  143. -    sprintf(fn,"%sVOTING.DAT",syscfg.datadir);
  144. -    f=sh_open(fn,O_RDWR | O_BINARY, S_IREAD | S_IWRITE);
  145. -    n=(int) (filelength(f) / sizeof(votingrec)) -1;
  146. -    for (i=0; i<20; i++)
  147. -      if (u.votes[i]) {
  148. -        if (i<=n) {
  149. -          sh_lseek(f,((long) i) * sizeof(votingrec), SEEK_SET);
  150. -          sh_read(f,(void *)&v,sizeof(votingrec));
  151. -          vr=v.responses[u.votes[i]-1];
  152. -          vr.numresponses--;
  153. -          v.responses[u.votes[i]-1]=vr;
  154. -          sh_lseek(f,((long) i) * sizeof(votingrec), SEEK_SET);
  155. -          sh_write(f,(void *)&v,sizeof(votingrec));
  156. -        }
  157. -        u.votes[i]=0;
  158. -      }
  159. -    f=sh_close(f);
  160. =    write_user(un,&u);
  161. =  }
  162. =}
  163.  
  164. ───[Step 4]────────────────────────────────────────────────────────────────────
  165.  
  166. Load VOTEEDIT.C and delete the following functions:
  167.  
  168. - void print_quests(void);
  169. - void set_question(void);
  170.  
  171. And replace the two following functions:
  172. void ivotes(void)
  173. {
  174.   char s1[101];
  175.   int i;
  176.  
  177.   i=topdata;
  178.   topdata=0;
  179.   topscreen();
  180.   create_chain_file();
  181.   if (instance>1)
  182.     sprintf(s1,"VOTE.EXE CHAIN.%3.3d /S",instance);
  183.   else
  184.    strcpy(s1,"VOTE.EXE CHAIN.TXT /S");
  185.   extern_prog(s1,EFLAG_SHRINK|EFLAG_COMIO|EFLAG_INTERNAL|EFLAG_TOPSCREEN);
  186.   topdata=i;
  187. }
  188.  
  189.  
  190. void voteprint(void)
  191. {
  192.   char s[81];
  193.   int i;
  194.  
  195.   create_chain_file();
  196.  
  197.   i=topdata;
  198.   topdata=0;
  199.   topscreen();
  200.   if (instance>1)
  201.     sprintf(s,"VOTE.EXE CHAIN.%3.3d /V",instance);
  202.   else
  203.     strcpy(s,"VOTE.EXE CHAIN.TXT /V");
  204.   extern_prog(s,EFLAG_SHRINK|EFLAG_COMIO|EFLAG_INTERNAL);
  205.   topdata=i;
  206. }
  207.  
  208.  
  209.  
  210. ───[Step 5]────────────────────────────────────────────────────────────────────
  211.  
  212. Load XINIT.C and delete the following void:
  213.  
  214. void read_voting(void);
  215.  
  216. And delete the following line in void init:
  217.  
  218. =    xenviron[i1++]="PKNOFASTCHAR=Y";
  219. =  xenviron[i1]=NULL;
  220. =
  221. -  read_voting();
  222. =
  223. =  if (syscfgovr.comflags & comflags_buffered_uart)
  224. =    high_speed=1;
  225.  
  226.  
  227. ───[Step 6]────────────────────────────────────────────────────────────────────
  228.  
  229. Load VARS.H and delete "questused[20]"
  230.  
  231. =              num_sys_list, oklevel, okmacro, okskey, ok_modem_stuff,
  232. *              oldx, oldy, ooneuser, outcom,
  233. =              restoring_shrink, save_dos, screenbottom, screenlen,
  234.  
  235. ───[Step 7]────────────────────────────────────────────────────────────────────
  236.  
  237. Compile the entire board (you need to rebuild FCNS.H), put VOTE.EXE in your
  238. main WWIV directory, and everything should work fine.
  239.  
  240. French Proverb: Pierre qui roule n'amasse pas mousse.
  241.  
  242. For comments, bug report and suggestion, e-mail at the following address:
  243.  
  244. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  245.                  -> spotnick@gamemaster.qc.ca
  246. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  247.                  -> martin.bourdages@radio.magicnet.com
  248.  
  249.                  =>   French Mod Division Support Sub   <=
  250.                                 SubType: FMD
  251.                            Host: @20302 (WWIVnet)
  252.                       Scan sublist for other networks
  253.  
  254.         Read PRODUCTS.FMD for the full list of our support systems.
  255.  
  256. ───[EOF]──────────────────────────────────────────────────────────────────────
  257.