lib/marvin/abstract_client.rb in Sutto-marvin-0.1.0.20081014 vs lib/marvin/abstract_client.rb in Sutto-marvin-0.1.0.20081016
- old
+ new
@@ -21,11 +21,11 @@
# call #client= on each handler if they respond to it.
def process_connect
self.class.setup
logger.debug "Initializing the current instance"
self.channels = []
- (self.connections ||= []) << self
+ self.connections << self
logger.debug "Setting the client for each handler"
self.handlers.each { |h| h.client = self if h.respond_to?(:client=) }
logger.debug "Dispatching the default :client_connected event"
dispatch_event :client_connected
end
@@ -165,10 +165,9 @@
# TODO: Get the correct mapping for a given
# Code.
def handle_incoming_numeric(opts = {})
code = opts[:code].to_i
args = Marvin::Util.arguments(opts[:data])
- logger.debug "Dispatching processed numeric - #{code}"
dispatch_event :incoming_numeric_processed, {:code => code, :data => args}
end
## General IRC Functions
\ No newline at end of file