Giter VIP home page Giter VIP logo

Comments (5)

noraj avatar noraj commented on August 15, 2024

I had to got in the code to see the default config to understand what is expected.

# (see Configuration.default_config)
def self.default_config
{
:server => "localhost",
:port => 6667,
:ssl => Configuration::SSL.new,
:password => nil,
:nick => "cinch",
:nicks => nil,
:realname => "cinch",
:user => "cinch",
:modes => [],
:messages_per_second => nil,
:server_queue_size => nil,
:strictness => :forgiving,
:message_split_start => '... ',
:message_split_end => ' ...',
:max_messages => nil,
:plugins => Configuration::Plugins.new,
:channels => [],
:encoding => :irc,
:reconnect => true,
:max_reconnect_delay => 300,
:local_host => nil,
:timeouts => Configuration::Timeouts.new,
:ping_interval => 120,
:delay_joins => 0,
:dcc => Configuration::DCC.new,
:sasl => Configuration::SASL.new,
:shared => {},
}
end

      # (see Configuration.default_config)
      def self.default_config
        {
          :server => "localhost",
          :port   => 6667,
          :ssl    => Configuration::SSL.new,
          :password => nil,
          :nick   => "cinch",
          :nicks  => nil,
          :realname => "cinch",
          :user => "cinch",
          :modes => [],
          :messages_per_second => nil,
          :server_queue_size => nil,
          :strictness => :forgiving,
          :message_split_start => '... ',
          :message_split_end   => ' ...',
          :max_messages => nil,
          :plugins => Configuration::Plugins.new,
          :channels => [],
          :encoding => :irc,
          :reconnect => true,
          :max_reconnect_delay => 300,
          :local_host => nil,
          :timeouts => Configuration::Timeouts.new,
          :ping_interval => 120,
          :delay_joins => 0,
          :dcc => Configuration::DCC.new,
          :sasl => Configuration::SASL.new,
          :shared => {},
        }
      end

So in fact ssl is expecting an SSL object.

from cinch.

noraj avatar noraj commented on August 15, 2024

Even knowing that and trying various configuration

ssl = Cinch::Configuration::SSL.new do |ssl|
    configure do |s|
        s.use       = true
        s.verify    = false
    end
end

I did not succeed to configure the bot to use SSL and connect to a 6697 port.

from cinch.

noraj avatar noraj commented on August 15, 2024

The good syntax was

bot = Cinch::Bot.new do |boti|
    configure do |c|
        c.server    = "172.17.0.1"
        c.port      = 6697
        c.ssl.use   = true
        c.nick      = "plop"
    end
...

By the way I see you are using OpenSSL to manage SSL connection but there is no `dependencies` section in the README or in the documentation.

![image](https://user-images.githubusercontent.com/16578570/47953558-98ab3d80-df7f-11e8-9594-26a86908885c.png)

from cinch.

dominikh avatar dominikh commented on August 15, 2024

https://www.rubydoc.info/gems/cinch/file/docs/bot_options.md

from cinch.

noraj avatar noraj commented on August 15, 2024

Why is that not put in yard?

Look how I did it for this lib:

from cinch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.