Committing with require.

This commit is contained in:
Diego Nehab 2004-05-28 06:16:43 +00:00
parent bf738a0336
commit 694edcc3c1
13 changed files with 153 additions and 80 deletions

View file

@ -8,12 +8,11 @@ function get_status(sock, valid)
local line, err = sock:receive()
local code, par
if not line then sock:close() return err end
_, _, code = string.find(line, "^(%d%d%d)")
code = socket.skip(2, string.find(line, "^(%d%d%d)"))
code = tonumber(code)
if code ~= valid then return code end
if code == 150 then
_,_,_, par = string.find(line, "^(%d%d%d) (%d*)")
par = tonumber(par)
par = tonumber(socket.skip(2, string.find(line, "^%d%d%d (%d*)"))
end
return nil, par
end