Method: Syndi::IRC::Library#initialize
- Defined in:
- lib/syndi/irc/library.rb
#initialize ⇒ Library
Returns a new instance of Library.
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/syndi/irc/library.rb', line 26 def initialize # Initialize our event system. @events = Syndi::API::Events.new # Prepare our collection of IRC server connections. @connections = Hash.new # Be ready to accept data. $m.events.on :net_receive, 1, &method(:receive) # Start connections when Syndi is started. $m.events.on :start, &method(:start) # Parse data. @parser = Syndi::IRC::Protocol.new self # Handle common functions. @common = Syndi::IRC::Common.new self end |