Committing with require.
This commit is contained in:
parent
bf738a0336
commit
694edcc3c1
13 changed files with 153 additions and 80 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue