def cmd_type(param)
      send_unauthorised and return unless logged_in?
      send_param_required and return if param.nil?
      if param.upcase.eql?("A")
        send_response "200 Type set to ASCII"
      elsif param.upcase.eql?("I")
        send_response "200 Type set to binary"
      else
        send_response "500 Invalid type"
      end
    end
def cmd_type(param)
      send_unauthorised and return unless logged_in?
      send_param_required and return if param.nil?
      if param.upcase.eql?("A")
        send_response "200 Type set to ASCII"
      elsif param.upcase.eql?("I")
        send_response "200 Type set to binary"
      else
        send_response "500 Invalid type"
      end
    end
like the MODE and STRU commands, TYPE dates back to a time when the FTP
 protocol was more aware of the content of the files it was transferring, and
 would sometimes be expected to translate things like EOL markers on the fly.

 Valid options were A(SCII), I(mage), E(BCDIC) or LN (for local type). Since
 we plan to just accept bytes from the client unchanged, I think Image mode is
 adequate. The RFC requires we accept ASCII mode however, so accept it, but
 ignore it.