home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / PWANK082.ZIP / PWANUKE.PPS < prev    next >
Text File  |  1995-04-09  |  1KB  |  43 lines

  1. ;
  2. ; Use this PPE to nuke files when using PWA flag by Drew.
  3. ; Install this PPE in EFLAG.CFG as an external command. It's all explained
  4. ; in EFLAG.CFG. 
  5. ;
  6.  
  7. string nukecfg, nukefile, filename, dirnr
  8. filename = gettoken()
  9. nukecfg = ppepath() + "flagnuke.cfg"
  10.  
  11. if (!exist(nukecfg)) then
  12.     freshline
  13.     println "Error: Flag.ppe is setup to use NUKE.PPE but cannot"
  14.     println "find FLAGNUKE.CFG, please contact sysop"
  15.     end
  16. endif
  17.  
  18. nukefile = readline(nukecfg, 1) + "\work\bcnk" + string(curconf()) +"."+ \
  19.            string(pcbnode())
  20.  
  21. if (upper(readline(nukefile, 1)) <> u_name()) then
  22.     fclose -1
  23.     delete nukefile
  24.     fappend 1, nukefile, O_WR, S_DN
  25.     fputln 1, u_name()
  26. else
  27.         fclose -1
  28.     fappend 1, nukefile, O_WR, S_DN
  29. endif
  30.  
  31. dirnr = string(pcbmac("@DIRNUM@"))
  32.  
  33. ; oops, assume upload dir, there's nothing we can do
  34. if (dirnr == "") then 
  35.         dirnr = string(pcbmac("@NUMDIR@"))
  36. endif
  37.  
  38. if (filename <> "") fputln 1, filename + " " + dirnr
  39. fclose 1
  40.  
  41. println "@X0CFile targetted for nuking...."
  42. delay 20
  43.