# File lib/net/yail.rb, line 317 def start_listening # We don't want to spawn an extra listener return if Thread === @ioloop_thread # Don't listen if socket is dead return if @dead_socket # Build forced / magic logic - welcome setting @me, ping response, etc. # Since we do these here, nobody can skip them and they're always first. setup_magic_handlers # Begin the listening thread @ioloop_thread = Thread.new {io_loop} @input_processor = Thread.new {process_input_loop} @privmsg_processor = Thread.new {process_privmsg_loop} # Let's begin the cycle by telling the server who we are. This should # start a TERRIBLE CHAIN OF EVENTS!!! handle(:outgoing_begin_connection, @username, @address, @realname) end