# File lib/parseconfig.rb, line 54
  def import_config()
    # The config is top down.. anything after a [group] gets added as part
    # of that group until a new [group] is found.
    group = nil
    open(self.config_file) { |f| f.each_with_index do |line, i|
      line.strip!

      # force_encoding not available in all versions of ruby
      begin
        if i.eql? 0 and line.include?("\xef\xbb\xbf".force_encoding("UTF-8"))
          line.delete!("\xef\xbb\xbf".force_encoding("UTF-8"))
        end
      rescue NoMethodError
      end

      is_comment = false
      @comments.each do |comment|
        if (/^#{comment}/.match(line))
          is_comment = true
          break
        end
      end

      unless is_comment
        if(/#{@splitRegex}/.match(line))
          param, value = line.split(/#{@splitRegex}/, 2)
          var_name = "#{param}".chomp.strip
          value = value.chomp.strip
          new_value = ''
          if (value)
            if value =~ /^['"](.*)['"]$/
              new_value = $1
            else
              new_value = value
            end
          else
            new_value = ''
          end

          if group
            self.add_to_group(group, var_name, new_value)
          else
            self.add(var_name, new_value)
          end

        elsif(/^\[(.+)\]$/.match(line).to_a != [])
          group = /^\[(.+)\]$/.match(line).to_a[1]
          self.add(group, {})

        end
      end
    end }
  end