mirror of
https://github.com/minetest-mods/irc.git
synced 2024-12-28 09:40:17 +01:00
Rename SASLPass and SASLUser settings to sasl.pass and sasl.user
This commit is contained in:
parent
ed20a55899
commit
e87d2e5bf2
@ -56,12 +56,12 @@ are not set, the default value is used.
|
|||||||
* `irc.NSPass` (string, default nil)
|
* `irc.NSPass` (string, default nil)
|
||||||
NickServ password. Don't use this if you use SASL authentication.
|
NickServ password. Don't use this if you use SASL authentication.
|
||||||
|
|
||||||
* `irc.SASLPass` (string, default nil)
|
* `irc.sasl.pass` (string, default nil)
|
||||||
SASL password, same as nickserv password.
|
SASL password, same as nickserv password.
|
||||||
You should use this instead of NickServ authentication
|
You should use this instead of NickServ authentication
|
||||||
if the server supports it.
|
if the server supports it.
|
||||||
|
|
||||||
* `irc.SASLUser` (string, default irc.nick)
|
* `irc.sasl.user` (string, default `irc.nick`)
|
||||||
The SASL username. This should normaly be set to your main NickServ account name.
|
The SASL username. This should normaly be set to your main NickServ account name.
|
||||||
|
|
||||||
* `irc.debug` (boolean, default false)
|
* `irc.debug` (boolean, default false)
|
||||||
|
@ -27,8 +27,8 @@ setting("string", "nick") -- Nickname (default "MT-<hash>", <hash> 6 random hexi
|
|||||||
setting("string", "server", "irc.freenode.net") -- Server to connect on joinplayer
|
setting("string", "server", "irc.freenode.net") -- Server to connect on joinplayer
|
||||||
setting("number", "port", 6667) -- Port to connect on joinplayer
|
setting("number", "port", 6667) -- Port to connect on joinplayer
|
||||||
setting("string", "NSPass") -- NickServ password
|
setting("string", "NSPass") -- NickServ password
|
||||||
setting("string", "SASLUser", mt_irc.config.nick) -- SASL username
|
setting("string", "sasl.user", mt_irc.config.nick) -- SASL username
|
||||||
setting("string", "SASLPass") -- SASL password
|
setting("string", "sasl.pass") -- SASL password
|
||||||
setting("string", "channel", "##mt-irc-mod") -- Channel to join
|
setting("string", "channel", "##mt-irc-mod") -- Channel to join
|
||||||
setting("string", "key") -- Key for the channel
|
setting("string", "key") -- Key for the channel
|
||||||
setting("bool", "send_join_part", true) -- Whether to send player join and part messages to the channel
|
setting("bool", "send_join_part", true) -- Whether to send player join and part messages to the channel
|
||||||
|
@ -212,12 +212,12 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function mt_irc.hooks.preregister(conn)
|
function mt_irc.hooks.preregister(conn)
|
||||||
if not (mt_irc.config.SASLUser and mt_irc.config.SASLPass) then return end
|
if not (mt_irc.config["sasl.user"] and mt_irc.config["sasl.pass"]) then return end
|
||||||
local authString = mt_irc.b64e(
|
local authString = mt_irc.b64e(
|
||||||
("%s\x00%s\x00%s"):format(
|
("%s\x00%s\x00%s"):format(
|
||||||
mt_irc.config.SASLUser,
|
mt_irc.config["sasl.user"],
|
||||||
mt_irc.config.SASLUser,
|
mt_irc.config["sasl.user"],
|
||||||
mt_irc.config.SASLPass)
|
mt_irc.config["sasl.pass"])
|
||||||
)
|
)
|
||||||
conn:send("CAP REQ sasl")
|
conn:send("CAP REQ sasl")
|
||||||
conn:send("AUTHENTICATE PLAIN")
|
conn:send("AUTHENTICATE PLAIN")
|
||||||
|
Loading…
Reference in New Issue
Block a user