def valid_channel_name?(channel, chantypes = ['#', '&'])
      prefix = Regexp.quote(chantypes.join)
      return false if channel.bytesize > 200
      return true if channel =~ /\A[#{prefix}]#@@channel\z/
      return false
    end
def valid_channel_name?(channel, chantypes = ['#', '&'])
      prefix = Regexp.quote(chantypes.join)
      return false if channel.bytesize > 200
      return true if channel =~ /\A[#{prefix}]#@@channel\z/
      return false
    end
Check if a string is a valid channel name.
 @param [String] channel A channel name to validate.
 @param [Array] chantypes The channel types which are allowed. This is
   the same as the "CHANTYPES" isupport option.
 @return [Boolean] Will be true if the channel name is valid.