Advertisement
shadowkat1010

[ShadOS] SWebHost

May 30th, 2012
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. --My stuff. Don't touch it.
  2. ver = "1.0"
  3. --URL of website
  4. url = "mcw.untitled.net/"
  5. --Type of website
  6. type = "web"
  7. --Text in website, use /n for new line.
  8. title = "--Untitled.net--"
  9. line = "Welcome to Untitled.net! \nThe unedited & un-named website!"
  10.  
  11. --The code. Don't. Mess. With. It.
  12. --Check URL isn't taken
  13. write "--SWebHost v"
  14. write (ver)
  15. print "--"
  16. id, otherurl = rednet.receive(10)
  17.  if otherurl == url then
  18.   print "URL Taken!"
  19.   sleep(2)
  20.   shell.run("/ShadOS/ProgramFiles/refresh")
  21.  else
  22.   print "URL Is not taken."
  23. --Here is where it repeats from.
  24. while true do
  25.   userid, verurl = rednet.receive(2)
  26.    if verurl == url then
  27.     print "Sending website type..."
  28.     rednet.send(userid,(type))
  29.      if type == "web" then
  30.       print "Sending page..."
  31.       rednet.send(userid,(title))
  32.       rednet.send(userid,(line))
  33.       print "WebPage Sent."
  34.      elseif type == dld then
  35.       rednet.send(userid,(title))
  36.       rednet.send(userid,(line))
  37.       print "Program Sent."
  38.      end
  39.    else
  40.     print "Incorrect Adress/No requests"
  41.   end
  42.  end
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement