home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / EVENTS / LVB093.ZIP / ALTW-06.423 next >
Text File  |  1994-08-04  |  6KB  |  191 lines

  1.  
  2.    ┌┬─── ──  ─   ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  3.    ││                    Alternative Worlds Presents                      │
  4.    └┼─────────────────────────────────────────────────────────────────────┐
  5.    ││ Mod Name       » ALTW-06A.MOD                                       │∙
  6.    ││ Difficulty     » █▒▒▒▒▒▒▒▒▒▒ (1/10)                                 │:
  7.    ││ WWIV Version   » 4.23 and higher                                    ││
  8.    ││ Date Affected  » 04/02/94                                           ││
  9.    :│ Files Affected » BBS.C / LILO.C / VOTEEDIT.C / MISCCMD.C            ││
  10.    ∙│ Description    » Run Logicom Voting Booth From Inside WWIV          ││
  11.     └─────────────────────────────────────────────────────────────────────┼┐
  12.     │     A French Mod Division Release - (C) 1994 Logicom Softwares      ││
  13. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─   ─  ── ───└┘
  14.  
  15.  
  16.  ┌┬══════════════════┐
  17.  ││ Long Description ││
  18.   └══════════════════┴┘
  19.  
  20. This is the mod you need to execute the Logicom Voting Booth from inside WWIV,
  21. if you don't have this utility and are using the voting system, you should
  22. get it on your local support board or call Alternative Worlds to get the
  23. newest version. Unregistered copies are not crippled.
  24.  
  25. Revision A:
  26.  
  27.     Done by Unca Scrooge, support multi-instance drop files.
  28.  
  29.  
  30.  
  31. ───[Step 1]────────────────────────────────────────────────────────────────────
  32.  
  33.    Load BBS.C and do the following changes to void mainmenu(void)
  34.  
  35. = void mainmenu(void)
  36. = {
  37. =  char *s, s1[81], s2[81], ch, tl1[81];
  38. *  int i, ac, it1, t,dv,win,i1,abort; // Add i1
  39. =  long l;
  40. =  userrec u;
  41.  
  42. ───[Step 2]────────────────────────────────────────────────────────────────────
  43.  
  44.   Change the command line for VOTEPRINT in void mainmenu...
  45.  
  46. =    if (strcmp(s,"VOTEPRINT")==0) {
  47. =      write_inst(INST_LOC_VOTEPRINT,0,INST_FLAGS_ONLINE);
  48. +     if (instance>1)
  49. +        sprintf(s1,"VOTE.EXE CHAIN.%3.3d /V",instance);
  50. +      else
  51. +        strcpy(s1,"VOTE.EXE CHAIN.TXT /V");
  52. *      full_external(s1,0,1);
  53. =    }
  54.  
  55.  
  56.   Still in void mainmenu, change to void 'V' to this one
  57.  
  58. =      case 'V':
  59. =        write_inst(INST_LOC_VOTE,0,INST_FLAGS_ONLINE);
  60. +        if (!(restrict_vote & thisuser.restrict)) {
  61. +          i1=topdata;
  62. +          topdata=0;
  63. +          topscreen();
  64. +          if (instance>1)
  65. +            sprintf(s1,"VOTE.EXE CHAIN.%3.3d /O",instance);
  66. +          else
  67. +            strcpy(s1,"VOTE.EXE CHAIN.TXT /O");
  68. +          full_external(s1,0,1);
  69. +          topdata=i1;
  70. +          topscreen();
  71. +        }
  72. =        break;
  73. =      case 'W':
  74.  
  75. ───[Step 3]────────────────────────────────────────────────────────────────────
  76.  
  77. Load LILO.C and to the following change in void logon
  78.  
  79. =  batchtime=0.0;
  80. =  numbatchdl=numbatch=0;
  81. +  if (!(restrict_vote & thisuser.restrict) &&
  82. +      (actsl>10) &&
  83. +      (live_user)) {
  84. +    if (instance>1)
  85. +      sprintf(s1,"VOTE.EXE CHAIN.%3.3d /L",instance);
  86. +    else
  87. +      strcpy(s1,"VOTE.EXE CHAIN.TXT /L");
  88. +    create_chain_file();
  89. +    full_external(s1,0,1);
  90. +    topscreen();
  91. +  }
  92.  
  93. ───[Step 4]────────────────────────────────────────────────────────────────────
  94.  
  95.   Load MISCCMD.C, and delete the following voids:
  96.  
  97. void print_quest(void);
  98. void vote_question(void);
  99. void vote(void);
  100.  
  101. ───[Step 5]────────────────────────────────────────────────────────────────────
  102.  
  103.   Load UEDIT.C, and do the following changes to void uedit
  104.  
  105. =          delmail(f,i);
  106. =        }
  107. =      }
  108. =    }
  109. =    close(f);
  110. -    sprintf(fn,"%sVOTING.DAT",syscfg.datadir);
  111. -    f=open(fn,O_RDWR | O_BINARY, S_IREAD | S_IWRITE);
  112. -    n=(int) (filelength(f) / sizeof(votingrec)) -1;
  113. -    for (i=0; i<20; i++)
  114. -      if (u.votes[i]) {
  115. -        if (i<=n) {
  116. -          lseek(f,((long) i) * sizeof(votingrec), SEEK_SET);
  117. -          read(f,(void *)&v,sizeof(votingrec));
  118. -          vr=v.responses[u.votes[i]-1];
  119. -          vr.numresponses--;
  120. -          v.responses[u.votes[i]-1]=vr;
  121. -          lseek(f,((long) i) * sizeof(votingrec), SEEK_SET);
  122. -          write(f,(void *)&v,sizeof(votingrec));
  123. -        }
  124. -        u.votes[i]=0;
  125. -      }
  126. =    write_user(un,&u);
  127. -    close(f);
  128. =  }
  129.  
  130. ───[Step 6]────────────────────────────────────────────────────────────────────
  131.  
  132.   Load VOTEEDIT.C and delete the following voids
  133.  
  134. void print_quests(void);
  135. void set_question(void);
  136. void voteprint(void);
  137.  
  138.   And remplace void ivotes with the following one:
  139.  
  140. void ivotes(void)
  141. {
  142.   char s1[101];
  143.   int i;
  144.  
  145.   i=topdata;
  146.   topdata=0;
  147.   create_chain_file();
  148.   topscreen();
  149.   if (instance>1)
  150.     sprintf(s1,"VOTE.EXE CHAIN.%3.3d /S",instance);
  151.   else
  152.     strcpy(s1,"VOTE.EXE CHAIN.TXT /S");
  153.  
  154.   full_external(s1,0,1);
  155.   topdata=i;
  156.   topscreen();
  157. }
  158.  
  159. ───[Step 7]────────────────────────────────────────────────────────────────────
  160.  
  161. Load XINIT.C and delete the following void:
  162.  
  163. void read_voting(void);
  164.  
  165. And delete the following line in void init:
  166.  
  167. - read_voting();
  168.  
  169. ───[Step 8]────────────────────────────────────────────────────────────────────
  170.  
  171. Load VARS.H and delete "questused[20]"
  172.  
  173. ───[Step 9]────────────────────────────────────────────────────────────────────
  174.  
  175. Time to build FCNS.H, of course the easiest way to do it is to do "MAKE FCNS"
  176. and it will be done automaticaly.
  177.  
  178. ───[Step 10]───────────────────────────────────────────────────────────────────
  179.  
  180. Compile the entire board, put VOTE.EXE in your main WWIV directory, and
  181. everything should work fine.
  182.  
  183. French Proverb: Pierre qui roule n'amasse pas mousse.
  184.  
  185. For comments, bug report and suggestion, e-mail at the following address:
  186.  
  187. French Mod Division #4 @5497 (WWIVnet/WWIVLink/IceNET/TerraNET)
  188.  
  189. French Division Support Sub: Sub Type "ESE", Host 5497. A Must!
  190. ───[EOF]──────────────────────────────────────────────────────────────────────
  191.