xXm0dzXx

Untitled

Jun 13th, 2012
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. #shell
  2.  
  3. function os.version()
  4. return "CraftOS 1.3"
  5. end
  6.  
  7. shell.setAlias( "ls", "list" )
  8. shell.setAlias( "dir", "list" )
  9. shell.setAlias( "cp", "copy" )
  10. shell.setAlias( "mv", "move" )
  11. shell.setAlias( "rm", "delete" )
  12. shell.setAlias( "pb", "rom/programs/http/pastebin" )
  13. shell.setAlias( "pastebin", "rom/programs/http/pastebin" )
  14.  
  15. oldfsread = fs.isReadOnly
  16. oldfsopen = fs.open
  17. oldioopen = io.open
  18. oldfsdelete = fs.delete
  19. oldfsmove = fs.move
  20.  
  21. function newfsread( path )
  22. if path == "disk/bios.lua" or path == "/disk/bios.lua" or path == "disk/shell" or path == "/disk/shell" then
  23. return true
  24. else
  25. return oldfsread( path )
  26. end
  27. end
  28.  
  29. function newfsopen( path, type )
  30. if path then
  31. if path == "disk/bios.lua" or path == "/disk/bios.lua" or path == "disk/shell" or path == "/disk/shell" then
  32. return false
  33. end
  34. end
  35.  
  36. return oldfsopen( path, type )
  37. end
  38.  
  39. function newioopen( path, type )
  40. if path then
  41. if path == "disk/bios.lua" or path == "/disk/bios.lua" or path == "disk/shell" or path == "/disk/shell" then
  42. return false
  43. end
  44. end
  45.  
  46. return oldioopen( path, type )
  47. end
  48.  
  49. function fsdelete( path )
  50. if path then
  51. if path == "disk/bios.lua" or path == "/disk/bios.lua" or path == "disk/shell" or path == "/disk/shell" then
  52. return false
  53. end
  54. end
  55.  
  56. return oldfsdelete( path )
  57. end
  58.  
  59. function fsmove( path , hai )
  60. if path then
  61. if path == "disk/bios.lua" or path == "/disk/bios.lua" or path == "disk/shell" or path == "/disk/shell" then
  62. return false
  63. end
  64. end
  65.  
  66. return oldfsmove( path , hai )
  67. end
  68.  
  69. fs.move = fsmove
  70. fs.delete = fsdelete
  71. fs.open = newfsopen
  72. io.open = newioopen
  73. fs.isReadOnly = newfsread
Advertisement
Add Comment
Please, Sign In to add comment