1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-27 04:18: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 net = require "net"
local event = require "event" local event = require "event"
local function parseurl(url) local function parseURL(url)
local proto,addr = url:match("(.-)://(.+)") local proto,addr = url:match("(.-)://(.+)")
addr = addr or url addr = addr or url
local hp, path = addr:match("(.-)(/.*)") local hp, path = addr:match("(.-)(/.*)")
@ -13,6 +13,7 @@ end
local tArgs = {...} local tArgs = {...}
local proto, host, port, path = parseURL(tArgs[1]) local proto, host, port, path = parseURL(tArgs[1])
port = tonumber(port) or 70
local socket = net.open(host,port) local socket = net.open(host,port)
socket:write("t"..path.."\n") socket:write("t"..path.."\n")