aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenGrid.Framework.Data.MySQL/MySQLGridData.cs')
-rw-r--r--OpenGrid.Framework.Data.MySQL/MySQLGridData.cs31
1 files changed, 28 insertions, 3 deletions
diff --git a/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs b/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
index 65a0fff..7a78800 100644
--- a/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
+++ b/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
@@ -15,15 +15,40 @@ namespace OpenGrid.Framework.Data.MySQL
15 } 15 }
16 public SimProfileData GetProfileByHandle(ulong handle) 16 public SimProfileData GetProfileByHandle(ulong handle)
17 { 17 {
18 return new SimProfileData(); 18 Dictionary<string,string> param = new Dictionary<string,string>();
19 param["handle"] = handle.ToString();
20
21 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param);
22 System.Data.IDataReader reader = result.ExecuteReader();
23
24 SimProfileData row = database.getRow( reader );
25 reader.Close();
26 result.Dispose();
27
28 return row;
19 } 29 }
20 public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) 30 public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
21 { 31 {
22 return new SimProfileData(); 32 Dictionary<string, string> param = new Dictionary<string, string>();
33 param["uuid"] = uuid.ToStringHyphenated();
34
35 System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param);
36 System.Data.IDataReader reader = result.ExecuteReader();
37
38 SimProfileData row = database.getRow(reader);
39 reader.Close();
40 result.Dispose();
41
42 return row;
23 } 43 }
24 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) 44 public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey)
25 { 45 {
26 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); 46 bool throwHissyFit = false; // Should be true by 1.0
47
48 if (throwHissyFit)
49 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
50
51 return true;
27 } 52 }
28 53
29 /// <summary> 54 /// <summary>