Semi-functional (in theory!)
							parent
							
								
									10f75f936e
								
							
						
					
					
						commit
						32ac9530a9
					
				| 
						 | 
				
			
			@ -15,15 +15,40 @@ namespace OpenGrid.Framework.Data.MySQL
 | 
			
		|||
        }
 | 
			
		||||
        public SimProfileData GetProfileByHandle(ulong handle)
 | 
			
		||||
        {
 | 
			
		||||
            return new SimProfileData();
 | 
			
		||||
            Dictionary<string,string> param = new Dictionary<string,string>();
 | 
			
		||||
            param["handle"] = handle.ToString();
 | 
			
		||||
 | 
			
		||||
            System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param);
 | 
			
		||||
            System.Data.IDataReader reader = result.ExecuteReader();
 | 
			
		||||
 | 
			
		||||
            SimProfileData row = database.getRow( reader );
 | 
			
		||||
            reader.Close();
 | 
			
		||||
            result.Dispose();
 | 
			
		||||
 | 
			
		||||
            return row;
 | 
			
		||||
        }
 | 
			
		||||
        public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
 | 
			
		||||
        {
 | 
			
		||||
            return new SimProfileData();
 | 
			
		||||
            Dictionary<string, string> param = new Dictionary<string, string>();
 | 
			
		||||
            param["uuid"] = uuid.ToStringHyphenated();
 | 
			
		||||
 | 
			
		||||
            System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param);
 | 
			
		||||
            System.Data.IDataReader reader = result.ExecuteReader();
 | 
			
		||||
 | 
			
		||||
            SimProfileData row = database.getRow(reader);
 | 
			
		||||
            reader.Close();
 | 
			
		||||
            result.Dispose();
 | 
			
		||||
 | 
			
		||||
            return row;
 | 
			
		||||
        }
 | 
			
		||||
        public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey)
 | 
			
		||||
        {
 | 
			
		||||
            throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
 | 
			
		||||
            bool throwHissyFit = false; // Should be true by 1.0
 | 
			
		||||
 | 
			
		||||
            if (throwHissyFit)
 | 
			
		||||
                throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
 | 
			
		||||
 | 
			
		||||
            return true;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,6 +9,8 @@ using MySql.Data;
 | 
			
		|||
using MySql.Data.Types;
 | 
			
		||||
using MySql.Data.MySqlClient;
 | 
			
		||||
 | 
			
		||||
using OpenGrid.Framework.Data;
 | 
			
		||||
 | 
			
		||||
namespace OpenGrid.Framework.Data.MySQL
 | 
			
		||||
{
 | 
			
		||||
    class MySQLManager
 | 
			
		||||
| 
						 | 
				
			
			@ -71,7 +73,8 @@ namespace OpenGrid.Framework.Data.MySQL
 | 
			
		|||
 | 
			
		||||
            if (reader.Read())
 | 
			
		||||
            {
 | 
			
		||||
                //retval.regionDataURI = reader["regionDataURI"];
 | 
			
		||||
                retval.regionLocX = (uint)reader["locX"];
 | 
			
		||||
                retval.regionDataURI = (string)reader["regionDataURI"];
 | 
			
		||||
                
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,6 +40,7 @@
 | 
			
		|||
    <Compile Include="GridData.cs" />
 | 
			
		||||
    <Compile Include="Properties\AssemblyInfo.cs" />
 | 
			
		||||
    <Compile Include="SimProfileData.cs" />
 | 
			
		||||
    <Compile Include="UserProfileData.cs" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
 | 
			
		||||
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue