aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL/MSSQLGridUserData.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLGridUserData.cs (renamed from OpenSim/Region/Communications/Hypergrid/HGUserDataPlugin.cs)44
1 files changed, 20 insertions, 24 deletions
diff --git a/OpenSim/Region/Communications/Hypergrid/HGUserDataPlugin.cs b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs
index 4b8fc26..9993720 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGUserDataPlugin.cs
+++ b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs
@@ -26,47 +26,43 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections;
30using System.Collections.Generic; 29using System.Collections.Generic;
31using System.Net; 30using System.Data;
32using System.Reflection; 31using System.Reflection;
33using System.Text.RegularExpressions; 32using System.Threading;
34using System.Xml.Serialization;
35using log4net; 33using log4net;
36using Nwc.XmlRpc;
37using OpenMetaverse; 34using OpenMetaverse;
38using OpenSim.Data;
39using OpenSim.Framework; 35using OpenSim.Framework;
40using OpenSim.Framework.Communications; 36using System.Data.SqlClient;
41using OpenSim.Framework.Communications.Clients;
42using OpenSim.Region.Communications.OGS1;
43 37
44namespace OpenSim.Region.Communications.Hypergrid 38namespace OpenSim.Data.MSSQL
45{ 39{
46 public class HGUserDataPlugin : OGS1UserDataPlugin 40 /// <summary>
41 /// A MSSQL Interface for Avatar Storage
42 /// </summary>
43 public class MSSQLGridUserData : MSSQLGenericTableHandler<GridUserData>,
44 IGridUserData
47 { 45 {
48 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
49 47
50 HGUserServices m_UserServices; 48 public MSSQLGridUserData(string connectionString, string realm) :
51 49 base(connectionString, realm, "UserGrid")
52 public HGUserDataPlugin()
53 { 50 {
54 } 51 }
55 52
56 public HGUserDataPlugin(CommunicationsManager commsManager, HGUserServices userServices) 53 public GridUserData GetGridUserData(string userID)
57 { 54 {
58 m_log.DebugFormat("[HG USER SERVICES]: {0} initialized", Name); 55 GridUserData[] ret = Get("UserID", userID);
59 m_commsManager = commsManager; 56
60 m_UserServices = userServices; 57 if (ret.Length == 0)
58 return null;
59
60 return ret[0];
61 } 61 }
62 62
63 protected override string GetUserServerURL(UUID userID) 63 public bool StoreGridUserData(GridUserData data)
64 { 64 {
65 string url = string.Empty; 65 return Store(data);
66 if (m_UserServices.IsForeignUser(userID, out url))
67 return url;
68 return m_commsManager.NetworkServersInfo.UserURL;
69 } 66 }
70
71 } 67 }
72} 68}