aboutsummaryrefslogtreecommitdiff
path: root/etc/dict.lua
diff options
context:
space:
mode:
Diffstat (limited to 'etc/dict.lua')
-rw-r--r--etc/dict.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/etc/dict.lua b/etc/dict.lua
index 933c1c8..d11ac93 100644
--- a/etc/dict.lua
+++ b/etc/dict.lua
@@ -8,12 +8,11 @@ function get_status(sock, valid)
8 local line, err = sock:receive() 8 local line, err = sock:receive()
9 local code, par 9 local code, par
10 if not line then sock:close() return err end 10 if not line then sock:close() return err end
11 _, _, code = string.find(line, "^(%d%d%d)") 11 code = socket.skip(2, string.find(line, "^(%d%d%d)"))
12 code = tonumber(code) 12 code = tonumber(code)
13 if code ~= valid then return code end 13 if code ~= valid then return code end
14 if code == 150 then 14 if code == 150 then
15 _,_,_, par = string.find(line, "^(%d%d%d) (%d*)") 15 par = tonumber(socket.skip(2, string.find(line, "^%d%d%d (%d*)"))
16 par = tonumber(par)
17 end 16 end
18 return nil, par 17 return nil, par
19end 18end