Rename SASLPass and SASLUser settings to sasl.pass and sasl.user

This commit is contained in:
ShadowNinja 2014-05-15 20:51:29 -04:00
parent ed20a55899
commit e87d2e5bf2
3 changed files with 8 additions and 8 deletions

View File

@ -56,12 +56,12 @@ are not set, the default value is used.
* `irc.NSPass` (string, default nil)
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.
You should use this instead of NickServ authentication
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.
* `irc.debug` (boolean, default false)

View File

@ -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("number", "port", 6667) -- Port to connect on joinplayer
setting("string", "NSPass") -- NickServ password
setting("string", "SASLUser", mt_irc.config.nick) -- SASL username
setting("string", "SASLPass") -- SASL password
setting("string", "sasl.user", mt_irc.config.nick) -- SASL username
setting("string", "sasl.pass") -- SASL password
setting("string", "channel", "##mt-irc-mod") -- Channel to join
setting("string", "key") -- Key for the channel
setting("bool", "send_join_part", true) -- Whether to send player join and part messages to the channel

View File

@ -212,12 +212,12 @@ end
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(
("%s\x00%s\x00%s"):format(
mt_irc.config.SASLUser,
mt_irc.config.SASLUser,
mt_irc.config.SASLPass)
mt_irc.config["sasl.user"],
mt_irc.config["sasl.user"],
mt_irc.config["sasl.pass"])
)
conn:send("CAP REQ sasl")
conn:send("AUTHENTICATE PLAIN")