mirror of
https://github.com/ShadowNinja/LuaIRC.git
synced 2025-07-20 16:40:26 +02:00
Compare commits
1 Commits
sleep
...
hook_conne
Author | SHA1 | Date | |
---|---|---|---|
b07166345a |
5
init.lua
5
init.lua
@ -66,8 +66,8 @@ meta_preconnect.unhook = meta.unhook
|
|||||||
function meta:invoke(name, ...)
|
function meta:invoke(name, ...)
|
||||||
local hooks = self.hooks[name]
|
local hooks = self.hooks[name]
|
||||||
if hooks then
|
if hooks then
|
||||||
for id,f in pairs(hooks) do
|
for id, f in pairs(hooks) do
|
||||||
if f(...) then
|
if f(self, ...) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -137,7 +137,6 @@ function meta_preconnect:connect(_host, _port)
|
|||||||
|
|
||||||
repeat
|
repeat
|
||||||
self:think()
|
self:think()
|
||||||
socket.select(nil, nil, 0.1) -- Sleep so that we don't eat CPU
|
|
||||||
until self.authed
|
until self.authed
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user