forked from minetest-mods/irc
Fix SASL auth under secure environment.
This commit is contained in:
parent
73cdb58c99
commit
9f8b4fd4af
5
init.lua
5
init.lua
@ -111,6 +111,10 @@ function irc:connect()
|
||||
})
|
||||
self:doHook(self.conn)
|
||||
local good, message = pcall(function()
|
||||
-- We need to swap the `require` function again since
|
||||
-- LuaIRC `require`s `ssl` if `irc.secure` is true.
|
||||
local old_require = require
|
||||
require = ie.require
|
||||
self.conn:connect({
|
||||
host = self.config.server,
|
||||
port = self.config.port,
|
||||
@ -119,6 +123,7 @@ function irc:connect()
|
||||
reconnect = self.config.reconnect,
|
||||
secure = self.config.secure
|
||||
})
|
||||
require = old_require
|
||||
end)
|
||||
|
||||
if not good then
|
||||
|
Loading…
Reference in New Issue
Block a user