Advertisement
fyrkantis

Poster

Aug 4th, 2024
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. peripheral.find("modem", rednet.open)
  2.  
  3. write("Finding database server ID...")
  4. rednet.broadcast("database", "dns-lookup")
  5. _, body = rednet.receive("dns-record-database")
  6. serverId = tonumber(body)
  7. print(" Done!")
  8.  
  9. while true do
  10.     write("Filename> ")
  11.     local filename = read()
  12.     write("Content> ")
  13.     local content = read()
  14.     rednet.send(serverId, filename..";"..content, "database-file-post")
  15. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement