home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / UPCHECK / UPLOAD20.ZIP / UPLOAD2.PPS < prev   
Text File  |  1993-10-24  |  3KB  |  56 lines

  1. ;*****************************************************************************
  2. ;*                            UPLOAD2.PPE v2.00                               *
  3. ;*                   PCBOARD 15.0 Upload Extension Checker                   *
  4. ;*                                                                           *
  5. ;*                        Written by Steven Hauswirth                        *
  6. ;*                 Written in PCBoard Programming Language                   *
  7. ;*                                                                           *
  8. ;*                          "The Power Palace BBS"                           *
  9. ;*               Node 1 - 312-594-0643 - [14.4 v32b] - 80386/40              *
  10. ;*                                                                           *
  11. ;*   This PPE will swap the config files for your upload processor based     *
  12. ;*   on the conference that the user is uploading into.                      *
  13. ;*****************************************************************************
  14.  
  15. STRING TEMP          ;Temporary Storage variable
  16. STRING NUM_FILES     ;Number of upload processors configuration files to swap
  17. STRING NAME_TO       ;Name of config file to rename conf. specific upload processor config to
  18. STRING NAME_DEFAULT  ;Name of upload proc. defaulting config file to use
  19. STRING NAME_CONF     ;Name of the conference specific upload proc. to swap from
  20. INTEGER K
  21.  
  22. ;**************************************************************************
  23. ;* Open config file and see if/how many upload processor config files     *
  24. ;* are going to be swapped.                                               *
  25. ;**************************************************************************
  26.  
  27. PRINTLN "Thanks for the uploads!"
  28. WRUSYS
  29. NAME_CONF = ""
  30.  
  31. FOPEN 1, PPEPATH() + "UPLOAD.CFG", O_RD, S_DN
  32. FGET 1, NUM_FILES
  33. IF (UPPER(NUM_FILES) = "NONE") GOTO SKIP   ;Config files option wont be used
  34. FGET 1, NAME_TO              ;Name that config files will be named TO
  35. FGET 1, NAME_DEFAULT         ;If current conference does not have a special
  36.                              ;config file then this one will be used as a default
  37. FOR K = 1 TO NUM_FILES
  38.      FGET 1, temp              ;Look to see if the current conference has a
  39.      IF (FERR(1)) GOTO SKIP    ; a specific processor config file to use.
  40.      IF (RIGHT(temp, LEN(temp)-INSTR(temp,".")) = STRING(CURCONF())) THEN
  41.            NAME_CONF = temp
  42.            GOTO SWAPEM
  43.      ENDIF
  44. NEXT
  45.  
  46. IF (NAME_CONF = "") NAME_CONF = NAME_DEFAULT
  47.  
  48. ;**************************************************************************
  49. ;* Swap upload processor config files and then exit                       *
  50. ;**************************************************************************
  51. :SWAPEM
  52.  
  53. SHELL TRUE, TEMP, PPEPATH() + "UPLOAD.BAT", NAME_CONF + " " + NAME_TO
  54.  
  55. :SKIP
  56. END