Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function irltimezones()
- local req = http.post("https://ccsystems.dannysmc.com/ccsystems.php", "ccsys=misc&cccmd=irltimezones")
- assert(type(req) == "table")
- req = textutils.unserialize(req.readAll())
- return req
- end
- function locate()
- local req = http.post("https://ccsystems.dannysmc.com/ccsystems.php", "ccsys=misc&cccmd=locate")
- req = textutils.unserialize(req.readAll())
- return req
- end
- function irltime(zone)
- if zone then
- req = http.post("https://ccsystems.dannysmc.com/ccsystems.php", "ccsys=misc$cccmd=irltime&timezone="..textutils.urlEncode(tostring(zone)))
- else
- req = http.post("https://ccsystems.dannysmc.com/ccsystems.php", "ccsys=misc$cccmd=irltime")
- end
- assert(type(req) == "table")
- req = textutils.unserialize(req.readAll())
- return req
- end
- function irltimeauto()
- url = "https://ccsystems.dannysmc.com/ccsystems.php"
- querystring = "ccsys=misc&cccmd=irltimeauto"
- local req = http.post(url, querystring)
- assert(type(req) == "table")
- return textutils.unserialize(req.readAll())
- end
- function irltimeasync(zone)
- if zone then
- req = http.request("https://ccsystems.dannysmc.com/ccsystems.php", "ccsys=misc$cccmd=irltime&timezone="..textutils.urlEncode(tostring(zone)))
- else
- req = http.request("https://ccsystems.dannysmc.com/ccsystems.php", "ccsys=misc$cccmd=irltime")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement