Skip to content
Snippets Groups Projects
Commit 696376e2 authored by Dominik Honnef's avatar Dominik Honnef
Browse files

Make list of SASL mechanisms configurable

parent e860fc72
No related branches found
No related tags found
No related merge requests found
......@@ -320,6 +320,17 @@ Default value
Description
: The password to use for SASL authentication.
### sasl.mechanisms
Type
: Array<Cinch::SASL::Mechanism>
Default value
: `[Cinch::SASL::DH_Blowfish, Cinch::SASL::Plain]`
Description
: The SASL mechanisms to use. All mechanisms in the array will be
attempted, until one was successful
## server
Type
: String
......
require "cinch/configuration"
require "cinch/sasl"
module Cinch
class Configuration
# @since 2.0.0
class SASL < Configuration
KnownOptions = [:username, :password]
KnownOptions = [:username, :password, :mechanisms]
def self.default_config
{
:username => nil,
:password => nil,
:mechanisms => [Cinch::SASL::DH_Blowfish, Cinch::SASL::Plain]
}
end
end
......
......@@ -210,7 +210,7 @@ module Cinch
def start
setup
if connect
@sasl_remaining_methods = [SASL::Plain, SASL::DH_Blowfish]
@sasl_remaining_methods = @bot.config.sasl.mechanisms.reverse
send_cap_ls
send_login
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment