Sha256: 182f1638a4c17d789f62d78cd82e4886e6186d1e270e486fb99c019d2cb29787

Contents?: true

Size: 379 Bytes

Versions: 16

Compression:

Stored size: 379 Bytes

Contents

hook(type: :cap_ack, cap_sasl: true) do |dat|
  dat[:plug].write_ 'AUTHENTICATE PLAIN'
end

hook(type: :auth_ok) do |dat|
  conf = dat[:plug].conf
  hash = Base64.strict_encode64(conf['sasl_user'] + "\0" + 
    conf['sasl_user'] + "\0" +
    conf['pass'])
  dat[:plug].write_("AUTHENTICATE #{hash}")
end

hook(type: :code, code: '903') do |dat|
  dat[:plug].write_('CAP END')
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
protonbot-0.3.7 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.3.6 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.3.5 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.3.4 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.3.3 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.3.2 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.3.1 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.3.0 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.2.7 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.2.6 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.2.5 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.2.4 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.2.3 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.2.2 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.2.1 lib/protonbot/core_plugin/hooks/sasl.rb
protonbot-0.2.0 lib/protonbot/core_plugin/hooks/sasl.rb