Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local input = read()
- local rand = tostring(math.random(1, 10000000))
- local web, err = http.get(input)
- if err then
- error(err, 0)
- end
- local file = fs.open(".temp_" .. rand, "w")
- file.write(web.readAll())
- file.close()
- local lines = {}
- for l in io.lines(".temp_" .. rand) do
- lines[#lines + 1] = l
- end
- local nameplaces = {}
- for place, dat in pairs(lines) do
- if dat:match("^ %?") then
- nameplaces[#nameplaces + 1] = place
- end
- end
- local names = {}
- for _, data in pairs(nameplaces) do
- names[#names + 1] = lines[data - 2]
- end
- for place, info in ipairs(names) do
- names[place] = "@" .. info
- end
- local basemsg = table.concat(names, " ")
- local final = "Welcome " .. basemsg
- fs.delete(".temp_" .. rand)
- local file = fs.open("OUTPUT_" .. rand .. ".msg", "w")
- file.write(final)
- file.close()
- shell.run("pastebin", "put", "OUTPUT_" .. rand .. ".msg")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement