    # File lib/rbot/irc.rb, line 1646
        def parse_isupport(line)
          debug "Parsing ISUPPORT #{line.inspect}"
          ar = line.split(' ')
          reparse = ""
          ar.each { |en|
            prekey, val = en.split('=', 2)
            if prekey =~ /^-(.*)/
              key = $1.downcase.to_sym
              val = false
            else
              key = prekey.downcase.to_sym
            end
            case key
            when :casemapping
              noval_warn(key, val) {
                @supports[key] = val.to_irc_casemap
              }
            when :chanlimit, :idchan, :maxlist, :targmax
              noval_warn(key, val) {
                groups = val.split(',')
                groups.each { |g|
                  k, v = g.split(':')
                  @supports[key][k] = v.to_i || 0
                  if @supports[key][k] == 0
                    warn "Deleting #{key} limit of 0 for #{k}"
                    @supports[key].delete(k)
                  end
                }
              }
            when :chanmodes
              noval_warn(key, val) {
                groups = val.split(',')
                @supports[key][:typea] = groups[0].scan(/./).map { |x| x.to_sym}
                @supports[key][:typeb] = groups[1].scan(/./).map { |x| x.to_sym}
                @supports[key][:typec] = groups[2].scan(/./).map { |x| x.to_sym}
                @supports[key][:typed] = groups[3].scan(/./).map { |x| x.to_sym}
              }
            when :channellen, :kicklen, :modes, :topiclen
              if val
                @supports[key] = val.to_i
              else
                @supports[key] = nil
              end
            when :chantypes
              @supports[key] = val # can also be nil
            when :excepts
              val ||= 'e'
              @supports[key] = val
            when :invex
              val ||= 'I'
              @supports[key] = val
            when :maxchannels
              noval_warn(key, val) {
                reparse += "CHANLIMIT=(chantypes):#{val} "
              }
            when :maxtargets
              noval_warn(key, val) {
                @supports[:targmax]['PRIVMSG'] = val.to_i
                @supports[:targmax]['NOTICE'] = val.to_i
              }
            when :network
              noval_warn(key, val) {
                @supports[key] = val
              }
            when :nicklen
              noval_warn(key, val) {
                @supports[key] = val.to_i
              }
            when :prefix
              if val
                val.scan(/\((.*)\)(.*)/) { |m, p|
                  @supports[key][:modes] = m.scan(/./).map { |x| x.to_sym}
                  @supports[key][:prefixes] = p.scan(/./).map { |x| x.to_sym}
                }
              else
                @supports[key][:modes] = nil
                @supports[key][:prefixes] = nil
              end
            when :safelist
              val_warn(key, val) {
                @supports[key] = val.nil? ? true : val
              }
            when :statusmsg
              noval_warn(key, val) {
                @supports[key] = val.scan(/./)
              }
            when :std
              noval_warn(key, val) {
                @supports[key] = val.split(',')
              }
            else
              @supports[key] =  val.nil? ? true : val
            end
          }
          reparse.gsub!("(chantypes)",@supports[:chantypes])
          parse_isupport(reparse) unless reparse.empty?
        end