From 439d63332d16612b29ec5637f47715f797f29097 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sun, 19 Aug 2012 17:21:04 -0700 Subject: [PATCH] Allow connecting to SSL-enabled IRC servers --- README.md | 4 ++++ lib/ponder/connection.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 6d259ea..c7f6ed0 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,10 @@ Besides the configuration for nick, server and port as shown in the **Getting St `port` describes the port that is used for the connection. It defaults to `6667`. +* `ssl` + + If `ssl` is set to `true`, the Thaum will connect to the server using SSL. It defaults to `false` + * `nick` `nick` describes the nick the Thaum will try to register when connecting to the server. It will not be updated if the Thaum changes its nick. It defaults to `'Ponder'`. diff --git a/lib/ponder/connection.rb b/lib/ponder/connection.rb index 5c1ac24..82c7277 100644 --- a/lib/ponder/connection.rb +++ b/lib/ponder/connection.rb @@ -13,6 +13,10 @@ def connection_completed @thaum.register end + def post_init + start_tls if @thaum.config.ssl + end + def unbind @thaum.connected = false @thaum.process_callbacks :disconnect, {}