1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-23 10:38:05 +11:00

fixed fget

This commit is contained in:
Izaya 2018-06-22 12:58:45 +10:00
parent 5e4f2727e1
commit c3cd39544b

View File

@ -1,7 +1,7 @@
local net = require "net"
local event = require "event"
local function parseurl(url)
local function parseURL(url)
local proto,addr = url:match("(.-)://(.+)")
addr = addr or url
local hp, path = addr:match("(.-)(/.*)")
@ -13,6 +13,7 @@ end
local tArgs = {...}
local proto, host, port, path = parseURL(tArgs[1])
port = tonumber(port) or 70
local socket = net.open(host,port)
socket:write("t"..path.."\n")