Method: Circus::IRC#initialize

Defined in:
lib/irc.rb

#initialize(options = {}) ⇒ IRC

Returns a new instance of IRC.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/irc.rb', line 15

def initialize(options = {})
  @default  = { :server     =>  "irc.freenode.net",
                :port       =>  6667,
                :nick       =>  "Circus-IRC",
                :username   =>  "circus",
                :realname   =>  "Using ruby with Circus IRC",
                :send_speed =>  0.5,
                :timeout    =>  15*60, #15 minutes
                :eol        =>  "\r\n",
                :debug      =>  false }
  
  @config = @default.merge options
  @event_manager = EventManager.new
  
  default_subscriptions
end