From e87d2e5bf2cb256e877baebeaf348c12e8c54db9 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Thu, 15 May 2014 20:51:29 -0400 Subject: [PATCH] Rename SASLPass and SASLUser settings to sasl.pass and sasl.user --- README.md | 4 ++-- config.lua | 4 ++-- hooks.lua | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a43277b..414b6e0 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/config.lua b/config.lua index a6ea892..8f4ff92 100644 --- a/config.lua +++ b/config.lua @@ -27,8 +27,8 @@ setting("string", "nick") -- Nickname (default "MT-", 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 diff --git a/hooks.lua b/hooks.lua index c791912..1820198 100644 --- a/hooks.lua +++ b/hooks.lua @@ -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")