1 / 43

;***************************************************************************

;***************************************************************************. ; ICONS.PPE by Scot Thompson. ; (freeware). ; version 1.0. ;***************************************************************************. ; PPE to see if remote user 1) is using RIP, 2) has the icons for my BBS,.

ailis
Download Presentation

;***************************************************************************

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ;***************************************************************************;***************************************************************************

  2. ; ICONS.PPE by Scot Thompson

  3. ; (freeware)

  4. ; version 1.0

  5. ;***************************************************************************;***************************************************************************

  6. ; PPE to see if remote user 1) is using RIP, 2) has the icons for my BBS,

  7. ; 3) send them if not

  8. ;

  9. DECLARE function rip_file_query(STRING fn) BOOLEAN

  10. *$usefuncs

  11. ;--------------------Main Procedure------------------------------

  12. BEGIN

  13. INTEGER rc, chan, i, j

  14. STRING prog, ppe_path, key, config_file, rip_loc, files(10), filelist

  15. BOOLEAN flags(10), testing, big_flag

  16. testing = FALSE

  17. ppe_path = PPEPATH()

  18. filelist = "icons"+ PCBNODE()

  19. config_file = ppe_path+PPENAME()+".CFG"

  20. prog = "pcbsz"

  21. IF (GRAFMODE() = "R") THEN • LOG "ICONS.PPE: PPE executed", FALSE • IF (ONLOCAL()) END • IF (!EXIST(config_file)) THEN • LOG "ICONS.PPE: config file does not exist", FALSE • END • ENDIF • rip_loc = READLINE(config_file,1) • i = 0 • WHILE (READLINE(config_file,i+2) != "") INC i • IF (testing) PRINTLN "Number read: ", i • IF (i > 11) THEN • REDIM files,i • REDIM flags,i • ENDIF • j = 0 • WHILE (j < i) DO • files(j) = READLINE(config_file, j+2) • flags(j) = rip_file_query (files(j)) • IF (testing) PRINTLN "Flag ", j," is ", flags(j) • INC j • ENDWHILE

  22. ; if the files exist, then we just go on, but if they do not exist, then

  23. ; we send them using zmodem to the terminal system (AFTER asking the user

  24. ; if they want them • j = 0 • big_flag = TRUE • WHILE (j < i) DO • big_flag = big_flag & flags(j) • INC j • ENDWHILE • IF (big_flag) THEN • LOG "ICONS.PPE: User has all icons", FALSE • END • ELSE • DISPFILE ppe_path+"XFER", SEC+LANG+GRAPH • KEYFLUSH • WHILE ( key = "") DO • key = INKEY() • DELAY 2 • ENDWHILE • IF (UPPER(key) = "Y") THEN • LOG "ICONS.PPE: User will d/l the missing icons", FALSE • chan = FNEXT() • IF ( chan = -1) THEN • LOG "ICONS.PPE: NO AVAILABLE FILE CHANNELS -- ABORTING!", FALSE • END • ELSE • FCREATE chan, filelist, O_WR, S_DN • FDEFOUT chan • j = 0 • WHILE (j < i) DO • IF (!flags(j)) FDPUTLN rip_loc+files(j) • INC j • ENDWHILE • IF (FERR(chan)) THEN • LOG "ICONS.PPE: FILE I/O ERROR -- ABORTING!", FALSE • END • ENDIF • FCLOSE chan • MPRINTLN "|9",CHR(27),"07020000<>" • SHELL TRUE, rc, prog, "1 1 @"+filelist • LOG "ICONS.PPE: icon file(s) transferred", FALSE • DELETE filelist • ENDIF • ELSE • LOG "ICONS.PPE: User didn't want to D/L the missing icons", FALSE • ENDIF • ENDIF

  25. ENDIF

  26. END

  27. ;---------------------RIP_FILE_QUERY FUNCTION----------------------

  28. ;

  29. ;sends the RIPscrip rip_file_query function to determine if the filename

  30. ;is present in the terminal. function returns an integer: 1 if filename

  31. ;does exist and 0 if it does not (true if exist/false if not exist)

  32. ;

  33. FUNCTION rip_file_query(STRING fn) BOOLEAN

  34. STRING key

  35. FRESHLINE

  36. KEYFLUSH

  37. MPRINTLN "!|1F000000", fn

  38. WHILE ( key = "" ) DO • key = INKEY() • DELAY 2

  39. ENDWHILE

  40. IF ( key = "1" ) THEN • rip_file_query = TRUE

  41. ELSE rip_file_query = FALSE

  42. ENDIF

  43. ENDFUNC

More Related