def auth(password)
      establish_connection

      @packet = Packet::Source.new
      @packet.auth(password)

      @socket.print @packet.to_s
      # on auth, one junk packet is sent
      rpacket = nil
      2.times { rpacket = build_response_packet }

      if rpacket.command_type != Packet::Source::RESPONSE_AUTH
        raise NetworkException.new("error authenticating: #{rpacket.command_type}")
      end

      @authed = true
      if @return_packets
        return rpacket
      else
        return true
      end
    end
def auth(password)
      establish_connection

      @packet = Packet::Source.new
      @packet.auth(password)

      @socket.print @packet.to_s
      # on auth, one junk packet is sent
      rpacket = nil
      2.times { rpacket = build_response_packet }

      if rpacket.command_type != Packet::Source::RESPONSE_AUTH
        raise NetworkException.new("error authenticating: #{rpacket.command_type}")
      end

      @authed = true
      if @return_packets
        return rpacket
      else
        return true
      end
    end
Requests authentication from the RCon server, given a
 password. Is only expected to be used once.