lib/rubot/connection.rb
# Connect to the IRC server. First try using SSL, then fall back to a
# regular TCP connection.
Connect to the IRC server. First try using SSL, then fall back to a
regular TCP connection.
Connect to the IRC server . First try using SSL then fall back to a regular TCP connection .
def connect
		tcp = TCPSocket.new(@host, @port)
		ssl = OpenSSL::SSL::SSLSocket::new(tcp)
		begin
			ssl.connect
			@socket = ssl
			@secure = true
		rescue
			tcp = TCPSocket::new(@host, @port)
			@socket = tcp
		end
		@connected = true
	end
def connect tcp = TCPSocket . new ( @host , @port ) ssl = OpenSSL :: SSL :: SSLSocket :: new ( tcp ) begin ssl . connect @socket = ssl @secure = true rescue tcp = TCPSocket :: new ( @host , @port ) @socket = tcp end @connected = true end
Connect to the IRC server.
Connect to the IRC server .