1
0
mirror of https://github.com/ShadowNinja/LuaIRC.git synced 2025-01-09 17:40:29 +01:00

Cleaning up getline function

This commit is contained in:
Joshua Simmons 2010-07-21 01:12:31 +10:00
parent d3c6ab849b
commit ca767c8b42

View File

@ -149,15 +149,13 @@ end
local function getline(self, errlevel)
local line, err = self.socket:receive("*l")
if line then
return line
end
if err ~= "timeout" and err ~= "wantread" then
if not line and err ~= "timeout" and err ~= "wantread" then
self:invoke("OnDisconnect", err, true)
self:shutdown()
error(err, errlevel)
end
return line
end
function meta:think()