home *** CD-ROM | disk | FTP | other *** search
- Dale Cooper #1 @10118
- Thu Jun 15 16:03:10 1995
- ┌────────────────────────────────────────────────────────────────────────────┐
- │ Mod Name: ALL002.424 Mod Authors: Swordfish & Dale Cooper │
- │ Difficulty: ██▒▒▒▒▒▒▒▒ Not too hard just follow the steps. │
- │ WWIV Version: 4.24 [6/15/95] │
- │ Files Affected: XFEROVL.C │
- │ Mod info: Enhanced global file uploading. Really makes local uploading │
- │ much nicer and simpler. │
- │ Tested on a Virgin Source! │
- │ │
- │ Disclaimer: Hi, We are SysOps Not Lawyers. │
- └────────────────────────────────────────────────────────────────────────────┘
-
- Extended Description: This mod will greatly enhance the local end of
- uploading files to your xfer section. When entering the description
- for the file, you can use one of four commands listed below :
-
- '-A' Will abort the entire upload process.
- '-D' Will delete the current file.
- '-N' Will skip to the next directory (if exists)
- '-S' Will skip the current file.
-
- Of Course you don't use the quotes just the - and then the letter for
- the command you want. Also now when hitting enter on blank file
- description it will instead of aborting just skip the current file and
- goto the next one. At least thats how we like it done.
-
- Legend :
- = [Leave as is]
- * [Change to]
- - [Remove Line]
- + [Add Line]
- [════════════════════════════════════════════════════════════════════════════]
-
- Mod Notes From DC : Ok I found this mod in a old 4.23 set of mods
- The mod author Michael Elliot 1@8062 deserves most of the credit.
- His code was along the right track yet the areas he was asking you
- to search for were not in either 4.23/4.24 stock source. There were
- also a few bugs like when you hit enter on a blank line in his
- orignal mod it would just go down lines until you used a '-'
- command. So liking the idea I started working on making it 4.24
- compatable and making it work smooth. Along with Swordfish I feel
- we have done just that.
-
- [════════════════════════════════════════════════════════════════════════════]
-
- Mod Notes From Swordfish :
- Easy Mod! Oh.. wait.. "tweak tweak" there, it works! :)
- I find this to be a handy mod, glad Dale Cooper ran across it.
- Even more glad that we got it working with 4.24. Enjoy!
-
- [════════════════════════════════════════════════════════════════════════════]
-
- On Wit Da Mod!
-
- STEP 0: Back Up Your Source.. don't say I didn't warn you.
-
- ───────────────────────────────────────────────────────
- STEP 1 : OPEN UP XFEROVL.C
- ───────────────────────────────────────────────────────
-
- In Xferovl.c at the very top right under the #include "vars.h" add
- the below.
-
- unsigned char GlobalUploading;
- unsigned char GlobalUploadStatus;
- #define GUL_NORMAL 0
- #define GUL_ABORTED 1
- #define GUL_DELETED 2
- #define GUL_NEXT 3
- #define GUL_SKIPPED 4
-
- Ok now skip down to int upload_file declration.
-
- =int upload_file(char *fn, int dn, char *desc)
- ={
- = directoryrec d;
- = uploadsrec u,u1;
- = int i,f;
- * char s[81],ff[81], RC; //ADD RC
-
- Now jump down to the below lines.
-
- = d.mask=mask_PD;
- = npr("%s: %4ldk :",u.filename,bytes_to_k(u.numbytes));
- = if ((desc) && (*desc)) {
- = strncpy(u.description,desc,58);
- = u.description[58]=0;
- = pl(u.description);
- = } else
-
- Add the below block right after the } else
-
- /* Add For ALL002 */
- u.description[0] = 0;
- inputl(u.description,58);
- if (u.description[0]==0) {
- GlobalUploadStatus = GUL_SKIPPED;
- RC = 1;
- return(RC);
- }
- nl();
- if ((GlobalUploading == 1) && ((u.description[0] == '-') &&
- (strlen(u.description) == 2)))
- {
- switch (upcase(u.description[1]))
- {
- case 'A':
- GlobalUploadStatus = GUL_ABORTED;
- RC = 0;
- break;
- case 'D':
- GlobalUploadStatus = GUL_DELETED;
- unlink(ff);
- RC = 1;
- break;
- case 'N':
- GlobalUploadStatus = GUL_NEXT;
- RC = 1;
- break;
- case 'S':
- GlobalUploadStatus = GUL_SKIPPED;
- RC = 1;
- break;
- default :
- RC = 1;
- break;
- }
- return(RC);
- }
- /* Done */
-
- Now delete or comment out everything after the block up to the below lines.
-
-
- = get_file_idz(&u,dn);
- = ++thisuser.uploaded;
- = if (!(d.mask & mask_cdrom))
- = modify_database(u.filename,1);
-
- Ok now jump down to int uploadall(int dn) and search for the below lines.
- And add the marked lines.
-
- = f1=findfirst(s1,&ff,0);
- = ok=1;
- = i1=0;
- = while ((f1==0) && (!hangup) && (numf<maxf) && (ok) && (!i1) && (!abort)) {
- + GlobalUploading = 1;
- + GlobalUploadStatus = GUL_NORMAL;
-
- Ok now search for the below lines. They should be right under what you
- just added.
-
- = ok=maybe_upload(ff.ff_name,dn,NULL);
- = f1=findnext(&ff);
- = checka(&abort,&next);
-
- Add the below block right after the above lines.
-
- /* Added for ALL002.MOD */
- switch (GlobalUploadStatus)
- {
- case GUL_NORMAL:
- break;
- case GUL_ABORTED:
- npr("\r\n7Uploading Aborted0\r\n");
- break;
- case GUL_DELETED:
- npr("\r\n7File Deleted0\r\n");
- break;
- case GUL_NEXT:
- npr("\r\n7Directory Skipped0\r\n");
- f1 = 1;
- break;
- case GUL_SKIPPED:
- npr("\r\n7File Skipped0\r\n");
- break;
- }
- GlobalUploading = 0;
- /* Done */
- = }
- = if ((!ok) || (abort))
- = pl(get_string(14));
-
- Ok you should be done. Save and recompile. Test it and let us know if it
- works for you.
-
- How to reach us...
-
- Dale Cooper Swordfish
- via WWIV nets
-
- 1@10118 WWIVnet 1@6251 SierraLink
- 1@1 DINER.COM 1@6200 DINER.COM
- via FIDOnet
-
- 1:282/2025 1:282/4089
-
- via Internet
-
- dcooper@winternet.com swordy@winternet.com
- [════════════════════════════════════════════════════════════════════════════]
- Also if you want to get quick answers from us on this or any of our
- mods and you have internet access with IRC. Hop on #WWIV and look for
- dcooper or Swordfish.
-
- [════════════════════════════════════════════════════════════════════════════]
- Authors can also be reached at:
- Double R Diner [ASV] 612-474-7350 or FishTank [ASV] 612-757-0218
-
- Double R Diner is a DreamWARE Support / ASYLUM Support Site
- FishTank is also a French Mod Division Support Site.
-