mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-23 02:28:05 +11:00
fget now handles ports better
This commit is contained in:
parent
256ffc09ab
commit
25dce8a759
@ -2,14 +2,12 @@ local net = require "net"
|
||||
local event = require "event"
|
||||
|
||||
local tArgs = {...}
|
||||
local host, path = tArgs[1], tArgs[2]
|
||||
local address, path = tArgs[1], tArgs[2]
|
||||
local port = 70
|
||||
|
||||
local sep = host:find(":")
|
||||
if sep then
|
||||
port=tonumber(host:sub(sep+1)) or port
|
||||
host=host:sub(1,sep-1)
|
||||
end
|
||||
local host,nport = host:match("(.+):(%d+)")
|
||||
port = nport or port
|
||||
host = host or address
|
||||
|
||||
local socket = net.open(host,port)
|
||||
socket:write("t"..path.."\n")
|
||||
|
@ -3,6 +3,7 @@
|
||||
files = {
|
||||
["master/OpenOS/etc/rc.d/minitel.lua"] = "//etc/rc.d",
|
||||
["master/OpenOS/usr/lib/net.lua"] = "/lib",
|
||||
["master/OpenOS/usr/man/minitel/minitel"] = "/usr/man",
|
||||
},
|
||||
name = "Minitel",
|
||||
description = "Simple and powerful networking stack",
|
||||
|
Loading…
Reference in New Issue
Block a user