def run(connection)
      @connection = connection
      bot = create_bot(connection)
      thread = Thread.new { bot.start }
      @ready.pop
      loop { deliver bot, dequeue }
    ensure
      thread.exit unless thread.nil?
    end
def run(connection)
      @connection = connection
      bot = create_bot(connection)
      thread = Thread.new { bot.start }
      @ready.pop
      loop { deliver bot, dequeue }
    ensure
      thread.exit unless thread.nil?
    end
Starts this IRC thread.

 @param connection [IRCConnection] the connection the thread controls