]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
ircsocket: clean up opt parsing
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 12 Dec 2008 20:32:34 +0000 (21:32 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Fri, 12 Dec 2008 20:39:12 +0000 (21:39 +0100)
Irc::Socket initialization now always has opt as last parameter, so
don't bother checking if it's a Hash.

lib/rbot/ircsocket.rb

index 496486bb6667591fa5b7175bef13648b38cfa4a2..9adca6badb67ad5f27ecfface080db869353c902 100644 (file)
@@ -275,11 +275,7 @@ module Irc
       @spooler = false
       @lines_sent = 0
       @lines_received = 0
-      if opts.kind_of?(Hash) and opts.key?(:ssl)
-        @ssl = opts[:ssl]
-      else
-        @ssl = false
-      end
+      @ssl = opts[:ssl]
     end
 
     def connected?