diff options
author | lbsa71 | 2007-10-05 11:27:46 +0000 |
---|---|---|
committer | lbsa71 | 2007-10-05 11:27:46 +0000 |
commit | ed6168b96b687a2f44177af8200d13b427089099 (patch) | |
tree | 2d87efb9c800f06233cbef0612617eba2c931f68 /OpenSim | |
parent | == The "right name and place" commit == (diff) | |
download | opensim-SC-ed6168b96b687a2f44177af8200d13b427089099.zip opensim-SC-ed6168b96b687a2f44177af8200d13b427089099.tar.gz opensim-SC-ed6168b96b687a2f44177af8200d13b427089099.tar.bz2 opensim-SC-ed6168b96b687a2f44177af8200d13b427089099.tar.xz |
* UserProfileData meets code conventions
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Communications/CommunicationsManager.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/LoginService.cs | 572 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/UserManagerBase.cs | 32 | ||||
-rw-r--r-- | OpenSim/Framework/Data.DB4o/DB4oUserData.cs | 6 | ||||
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLManager.cs | 34 | ||||
-rw-r--r-- | OpenSim/Framework/Data.MySQL/MySQLUserData.cs | 6 | ||||
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | 102 | ||||
-rw-r--r-- | OpenSim/Framework/General/Types/UserProfileData.cs | 48 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 26 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 38 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalLoginService.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | 28 |
12 files changed, 456 insertions, 456 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 5af07f7..010d5ce 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -162,8 +162,8 @@ namespace OpenSim.Framework.Communications | |||
162 | if (profileData != null) | 162 | if (profileData != null) |
163 | { | 163 | { |
164 | LLUUID profileId = profileData.UUID; | 164 | LLUUID profileId = profileData.UUID; |
165 | string firstname = profileData.username; | 165 | string firstname = profileData.Firstname; |
166 | string lastname = profileData.surname; | 166 | string lastname = profileData.Lastname; |
167 | 167 | ||
168 | remote_client.SendNameReply(profileId, firstname, lastname); | 168 | remote_client.SendNameReply(profileId, firstname, lastname); |
169 | } | 169 | } |
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 06abb69..31c9363 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs | |||
@@ -1,287 +1,287 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections; | 2 | using System.Collections; |
3 | using System.Collections.Generic; | 3 | using System.Collections.Generic; |
4 | using System.Reflection; | 4 | using System.Reflection; |
5 | using System.Security.Cryptography; | 5 | using System.Security.Cryptography; |
6 | using libsecondlife; | 6 | using libsecondlife; |
7 | using Nwc.XmlRpc; | 7 | using Nwc.XmlRpc; |
8 | using OpenSim.Framework.Console; | 8 | using OpenSim.Framework.Console; |
9 | using OpenSim.Framework.Interfaces; | 9 | using OpenSim.Framework.Interfaces; |
10 | using OpenSim.Framework.Inventory; | 10 | using OpenSim.Framework.Inventory; |
11 | using OpenSim.Framework.Types; | 11 | using OpenSim.Framework.Types; |
12 | using OpenSim.Framework.Utilities; | 12 | using OpenSim.Framework.Utilities; |
13 | 13 | ||
14 | using OpenSim.Framework.Configuration; | 14 | using OpenSim.Framework.Configuration; |
15 | using InventoryFolder = OpenSim.Framework.Inventory.InventoryFolder; | 15 | using InventoryFolder = OpenSim.Framework.Inventory.InventoryFolder; |
16 | 16 | ||
17 | namespace OpenSim.Framework.UserManagement | 17 | namespace OpenSim.Framework.UserManagement |
18 | { | 18 | { |
19 | public class LoginService | 19 | public class LoginService |
20 | { | 20 | { |
21 | protected string m_welcomeMessage = "Welcome to OpenSim"; | 21 | protected string m_welcomeMessage = "Welcome to OpenSim"; |
22 | protected UserManagerBase m_userManager = null; | 22 | protected UserManagerBase m_userManager = null; |
23 | 23 | ||
24 | public LoginService(UserManagerBase userManager, string welcomeMess) | 24 | public LoginService(UserManagerBase userManager, string welcomeMess) |
25 | { | 25 | { |
26 | m_userManager = userManager; | 26 | m_userManager = userManager; |
27 | if (welcomeMess != "") | 27 | if (welcomeMess != "") |
28 | { | 28 | { |
29 | m_welcomeMessage = welcomeMess; | 29 | m_welcomeMessage = welcomeMess; |
30 | } | 30 | } |
31 | } | 31 | } |
32 | 32 | ||
33 | /// <summary> | 33 | /// <summary> |
34 | /// Main user login function | 34 | /// Main user login function |
35 | /// </summary> | 35 | /// </summary> |
36 | /// <param name="request">The XMLRPC request</param> | 36 | /// <param name="request">The XMLRPC request</param> |
37 | /// <returns>The response to send</returns> | 37 | /// <returns>The response to send</returns> |
38 | public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) | 38 | public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) |
39 | { | 39 | { |
40 | 40 | ||
41 | System.Console.WriteLine("Attempting login now..."); | 41 | System.Console.WriteLine("Attempting login now..."); |
42 | XmlRpcResponse response = new XmlRpcResponse(); | 42 | XmlRpcResponse response = new XmlRpcResponse(); |
43 | Hashtable requestData = (Hashtable)request.Params[0]; | 43 | Hashtable requestData = (Hashtable)request.Params[0]; |
44 | 44 | ||
45 | bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd")); | 45 | bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd")); |
46 | bool GoodLogin = false; | 46 | bool GoodLogin = false; |
47 | 47 | ||
48 | UserProfileData userProfile; | 48 | UserProfileData userProfile; |
49 | LoginResponse logResponse = new LoginResponse(); | 49 | LoginResponse logResponse = new LoginResponse(); |
50 | 50 | ||
51 | if (GoodXML) | 51 | if (GoodXML) |
52 | { | 52 | { |
53 | string firstname = (string)requestData["first"]; | 53 | string firstname = (string)requestData["first"]; |
54 | string lastname = (string)requestData["last"]; | 54 | string lastname = (string)requestData["last"]; |
55 | string passwd = (string)requestData["passwd"]; | 55 | string passwd = (string)requestData["passwd"]; |
56 | 56 | ||
57 | userProfile = GetTheUser(firstname, lastname); | 57 | userProfile = GetTheUser(firstname, lastname); |
58 | if (userProfile == null) | 58 | if (userProfile == null) |
59 | return logResponse.CreateLoginFailedResponse(); | 59 | return logResponse.CreateLoginFailedResponse(); |
60 | 60 | ||
61 | GoodLogin = AuthenticateUser(userProfile, passwd); | 61 | GoodLogin = AuthenticateUser(userProfile, passwd); |
62 | } | 62 | } |
63 | else | 63 | else |
64 | { | 64 | { |
65 | return logResponse.CreateGridErrorResponse(); | 65 | return logResponse.CreateGridErrorResponse(); |
66 | } | 66 | } |
67 | 67 | ||
68 | if (!GoodLogin) | 68 | if (!GoodLogin) |
69 | { | 69 | { |
70 | return logResponse.CreateLoginFailedResponse(); | 70 | return logResponse.CreateLoginFailedResponse(); |
71 | } | 71 | } |
72 | else | 72 | else |
73 | { | 73 | { |
74 | // If we already have a session... | 74 | // If we already have a session... |
75 | if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline) | 75 | if (userProfile.CurrentAgent != null && userProfile.CurrentAgent.agentOnline) |
76 | { | 76 | { |
77 | // Reject the login | 77 | // Reject the login |
78 | return logResponse.CreateAlreadyLoggedInResponse(); | 78 | return logResponse.CreateAlreadyLoggedInResponse(); |
79 | } | 79 | } |
80 | // Otherwise... | 80 | // Otherwise... |
81 | // Create a new agent session | 81 | // Create a new agent session |
82 | CreateAgent(userProfile, request); | 82 | CreateAgent(userProfile, request); |
83 | 83 | ||
84 | try | 84 | try |
85 | { | 85 | { |
86 | LLUUID agentID = userProfile.UUID; | 86 | LLUUID agentID = userProfile.UUID; |
87 | 87 | ||
88 | // Inventory Library Section | 88 | // Inventory Library Section |
89 | InventoryData inventData = this.CreateInventoryData(agentID); | 89 | InventoryData inventData = this.CreateInventoryData(agentID); |
90 | ArrayList AgentInventoryArray = inventData.InventoryArray; | 90 | ArrayList AgentInventoryArray = inventData.InventoryArray; |
91 | 91 | ||
92 | Hashtable InventoryRootHash = new Hashtable(); | 92 | Hashtable InventoryRootHash = new Hashtable(); |
93 | InventoryRootHash["folder_id"] = inventData.RootFolderID.ToStringHyphenated(); | 93 | InventoryRootHash["folder_id"] = inventData.RootFolderID.ToStringHyphenated(); |
94 | ArrayList InventoryRoot = new ArrayList(); | 94 | ArrayList InventoryRoot = new ArrayList(); |
95 | InventoryRoot.Add(InventoryRootHash); | 95 | InventoryRoot.Add(InventoryRootHash); |
96 | userProfile.rootInventoryFolderID = inventData.RootFolderID; | 96 | userProfile.RootInventoryFolderId = inventData.RootFolderID; |
97 | 97 | ||
98 | // Circuit Code | 98 | // Circuit Code |
99 | uint circode = (uint)(Util.RandomClass.Next()); | 99 | uint circode = (uint)(Util.RandomClass.Next()); |
100 | 100 | ||
101 | logResponse.Lastname = userProfile.surname; | 101 | logResponse.Lastname = userProfile.Lastname; |
102 | logResponse.Firstname = userProfile.username; | 102 | logResponse.Firstname = userProfile.Firstname; |
103 | logResponse.AgentID = agentID.ToStringHyphenated(); | 103 | logResponse.AgentID = agentID.ToStringHyphenated(); |
104 | logResponse.SessionID = userProfile.currentAgent.sessionID.ToStringHyphenated(); | 104 | logResponse.SessionID = userProfile.CurrentAgent.sessionID.ToStringHyphenated(); |
105 | logResponse.SecureSessionID = userProfile.currentAgent.secureSessionID.ToStringHyphenated(); | 105 | logResponse.SecureSessionID = userProfile.CurrentAgent.secureSessionID.ToStringHyphenated(); |
106 | logResponse.InventoryRoot = InventoryRoot; | 106 | logResponse.InventoryRoot = InventoryRoot; |
107 | logResponse.InventorySkeleton = AgentInventoryArray; | 107 | logResponse.InventorySkeleton = AgentInventoryArray; |
108 | logResponse.InventoryLibrary = this.GetInventoryLibrary(); | 108 | logResponse.InventoryLibrary = this.GetInventoryLibrary(); |
109 | logResponse.InventoryLibraryOwner = this.GetLibraryOwner(); | 109 | logResponse.InventoryLibraryOwner = this.GetLibraryOwner(); |
110 | logResponse.CircuitCode = (Int32)circode; | 110 | logResponse.CircuitCode = (Int32)circode; |
111 | //logResponse.RegionX = 0; //overwritten | 111 | //logResponse.RegionX = 0; //overwritten |
112 | //logResponse.RegionY = 0; //overwritten | 112 | //logResponse.RegionY = 0; //overwritten |
113 | logResponse.Home = "!!null temporary value {home}!!"; // Overwritten | 113 | logResponse.Home = "!!null temporary value {home}!!"; // Overwritten |
114 | //logResponse.LookAt = "\n[r" + TheUser.homeLookAt.X.ToString() + ",r" + TheUser.homeLookAt.Y.ToString() + ",r" + TheUser.homeLookAt.Z.ToString() + "]\n"; | 114 | //logResponse.LookAt = "\n[r" + TheUser.homeLookAt.X.ToString() + ",r" + TheUser.homeLookAt.Y.ToString() + ",r" + TheUser.homeLookAt.Z.ToString() + "]\n"; |
115 | //logResponse.SimAddress = "127.0.0.1"; //overwritten | 115 | //logResponse.SimAddress = "127.0.0.1"; //overwritten |
116 | //logResponse.SimPort = 0; //overwritten | 116 | //logResponse.SimPort = 0; //overwritten |
117 | logResponse.Message = this.GetMessage(); | 117 | logResponse.Message = this.GetMessage(); |
118 | 118 | ||
119 | try | 119 | try |
120 | { | 120 | { |
121 | this.CustomiseResponse(logResponse, userProfile); | 121 | this.CustomiseResponse(logResponse, userProfile); |
122 | } | 122 | } |
123 | catch (Exception e) | 123 | catch (Exception e) |
124 | { | 124 | { |
125 | System.Console.WriteLine(e.ToString()); | 125 | System.Console.WriteLine(e.ToString()); |
126 | return logResponse.CreateDeadRegionResponse(); | 126 | return logResponse.CreateDeadRegionResponse(); |
127 | //return logResponse.ToXmlRpcResponse(); | 127 | //return logResponse.ToXmlRpcResponse(); |
128 | } | 128 | } |
129 | CommitAgent(ref userProfile); | 129 | CommitAgent(ref userProfile); |
130 | return logResponse.ToXmlRpcResponse(); | 130 | return logResponse.ToXmlRpcResponse(); |
131 | 131 | ||
132 | } | 132 | } |
133 | 133 | ||
134 | catch (Exception E) | 134 | catch (Exception E) |
135 | { | 135 | { |
136 | System.Console.WriteLine(E.ToString()); | 136 | System.Console.WriteLine(E.ToString()); |
137 | } | 137 | } |
138 | //} | 138 | //} |
139 | } | 139 | } |
140 | return response; | 140 | return response; |
141 | 141 | ||
142 | } | 142 | } |
143 | 143 | ||
144 | /// <summary> | 144 | /// <summary> |
145 | /// Customises the login response and fills in missing values. | 145 | /// Customises the login response and fills in missing values. |
146 | /// </summary> | 146 | /// </summary> |
147 | /// <param name="response">The existing response</param> | 147 | /// <param name="response">The existing response</param> |
148 | /// <param name="theUser">The user profile</param> | 148 | /// <param name="theUser">The user profile</param> |
149 | public virtual void CustomiseResponse(LoginResponse response, UserProfileData theUser) | 149 | public virtual void CustomiseResponse(LoginResponse response, UserProfileData theUser) |
150 | { | 150 | { |
151 | } | 151 | } |
152 | 152 | ||
153 | /// <summary> | 153 | /// <summary> |
154 | /// Saves a target agent to the database | 154 | /// Saves a target agent to the database |
155 | /// </summary> | 155 | /// </summary> |
156 | /// <param name="profile">The users profile</param> | 156 | /// <param name="profile">The users profile</param> |
157 | /// <returns>Successful?</returns> | 157 | /// <returns>Successful?</returns> |
158 | public bool CommitAgent(ref UserProfileData profile) | 158 | public bool CommitAgent(ref UserProfileData profile) |
159 | { | 159 | { |
160 | // Saves the agent to database | 160 | // Saves the agent to database |
161 | return true; | 161 | return true; |
162 | } | 162 | } |
163 | 163 | ||
164 | 164 | ||
165 | /// <summary> | 165 | /// <summary> |
166 | /// Checks a user against it's password hash | 166 | /// Checks a user against it's password hash |
167 | /// </summary> | 167 | /// </summary> |
168 | /// <param name="profile">The users profile</param> | 168 | /// <param name="profile">The users profile</param> |
169 | /// <param name="password">The supplied password</param> | 169 | /// <param name="password">The supplied password</param> |
170 | /// <returns>Authenticated?</returns> | 170 | /// <returns>Authenticated?</returns> |
171 | public virtual bool AuthenticateUser(UserProfileData profile, string password) | 171 | public virtual bool AuthenticateUser(UserProfileData profile, string password) |
172 | { | 172 | { |
173 | 173 | ||
174 | MainLog.Instance.Verbose( | 174 | MainLog.Instance.Verbose( |
175 | "Authenticating " + profile.username + " " + profile.surname); | 175 | "Authenticating " + profile.Firstname + " " + profile.Lastname); |
176 | 176 | ||
177 | password = password.Remove(0, 3); //remove $1$ | 177 | password = password.Remove(0, 3); //remove $1$ |
178 | 178 | ||
179 | string s = Util.Md5Hash(password + ":" + profile.passwordSalt); | 179 | string s = Util.Md5Hash(password + ":" + profile.PasswordSalt); |
180 | 180 | ||
181 | return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); | 181 | return profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); |
182 | } | 182 | } |
183 | 183 | ||
184 | /// <summary> | 184 | /// <summary> |
185 | /// | 185 | /// |
186 | /// </summary> | 186 | /// </summary> |
187 | /// <param name="profile"></param> | 187 | /// <param name="profile"></param> |
188 | /// <param name="request"></param> | 188 | /// <param name="request"></param> |
189 | public void CreateAgent(UserProfileData profile, XmlRpcRequest request) | 189 | public void CreateAgent(UserProfileData profile, XmlRpcRequest request) |
190 | { | 190 | { |
191 | this.m_userManager.CreateAgent(profile, request); | 191 | this.m_userManager.CreateAgent(profile, request); |
192 | } | 192 | } |
193 | 193 | ||
194 | /// <summary> | 194 | /// <summary> |
195 | /// | 195 | /// |
196 | /// </summary> | 196 | /// </summary> |
197 | /// <param name="firstname"></param> | 197 | /// <param name="firstname"></param> |
198 | /// <param name="lastname"></param> | 198 | /// <param name="lastname"></param> |
199 | /// <returns></returns> | 199 | /// <returns></returns> |
200 | public virtual UserProfileData GetTheUser(string firstname, string lastname) | 200 | public virtual UserProfileData GetTheUser(string firstname, string lastname) |
201 | { | 201 | { |
202 | return this.m_userManager.GetUserProfile(firstname, lastname); | 202 | return this.m_userManager.GetUserProfile(firstname, lastname); |
203 | } | 203 | } |
204 | 204 | ||
205 | /// <summary> | 205 | /// <summary> |
206 | /// | 206 | /// |
207 | /// </summary> | 207 | /// </summary> |
208 | /// <returns></returns> | 208 | /// <returns></returns> |
209 | public virtual string GetMessage() | 209 | public virtual string GetMessage() |
210 | { | 210 | { |
211 | return m_welcomeMessage; | 211 | return m_welcomeMessage; |
212 | } | 212 | } |
213 | 213 | ||
214 | /// <summary> | 214 | /// <summary> |
215 | /// | 215 | /// |
216 | /// </summary> | 216 | /// </summary> |
217 | /// <returns></returns> | 217 | /// <returns></returns> |
218 | protected virtual ArrayList GetInventoryLibrary() | 218 | protected virtual ArrayList GetInventoryLibrary() |
219 | { | 219 | { |
220 | //return new ArrayList(); | 220 | //return new ArrayList(); |
221 | Hashtable TempHash = new Hashtable(); | 221 | Hashtable TempHash = new Hashtable(); |
222 | TempHash["name"] = "OpenSim Library"; | 222 | TempHash["name"] = "OpenSim Library"; |
223 | TempHash["parent_id"] = LLUUID.Zero.ToStringHyphenated(); | 223 | TempHash["parent_id"] = LLUUID.Zero.ToStringHyphenated(); |
224 | TempHash["version"] = 1; | 224 | TempHash["version"] = 1; |
225 | TempHash["type_default"] = -1; | 225 | TempHash["type_default"] = -1; |
226 | TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba000"; | 226 | TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba000"; |
227 | ArrayList temp = new ArrayList(); | 227 | ArrayList temp = new ArrayList(); |
228 | temp.Add(TempHash); | 228 | temp.Add(TempHash); |
229 | 229 | ||
230 | TempHash = new Hashtable(); | 230 | TempHash = new Hashtable(); |
231 | TempHash["name"] = "Texture Library"; | 231 | TempHash["name"] = "Texture Library"; |
232 | TempHash["parent_id"] = "00000112-000f-0000-0000-000100bba000"; | 232 | TempHash["parent_id"] = "00000112-000f-0000-0000-000100bba000"; |
233 | TempHash["version"] = 1; | 233 | TempHash["version"] = 1; |
234 | TempHash["type_default"] = -1; | 234 | TempHash["type_default"] = -1; |
235 | TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba001"; | 235 | TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba001"; |
236 | temp.Add(TempHash); | 236 | temp.Add(TempHash); |
237 | return temp; | 237 | return temp; |
238 | } | 238 | } |
239 | 239 | ||
240 | /// <summary> | 240 | /// <summary> |
241 | /// | 241 | /// |
242 | /// </summary> | 242 | /// </summary> |
243 | /// <returns></returns> | 243 | /// <returns></returns> |
244 | protected virtual ArrayList GetLibraryOwner() | 244 | protected virtual ArrayList GetLibraryOwner() |
245 | { | 245 | { |
246 | //for now create random inventory library owner | 246 | //for now create random inventory library owner |
247 | Hashtable TempHash = new Hashtable(); | 247 | Hashtable TempHash = new Hashtable(); |
248 | TempHash["agent_id"] = "11111111-1111-0000-0000-000100bba000"; | 248 | TempHash["agent_id"] = "11111111-1111-0000-0000-000100bba000"; |
249 | ArrayList inventoryLibOwner = new ArrayList(); | 249 | ArrayList inventoryLibOwner = new ArrayList(); |
250 | inventoryLibOwner.Add(TempHash); | 250 | inventoryLibOwner.Add(TempHash); |
251 | return inventoryLibOwner; | 251 | return inventoryLibOwner; |
252 | } | 252 | } |
253 | 253 | ||
254 | protected virtual InventoryData CreateInventoryData(LLUUID userID) | 254 | protected virtual InventoryData CreateInventoryData(LLUUID userID) |
255 | { | 255 | { |
256 | AgentInventory userInventory = new AgentInventory(); | 256 | AgentInventory userInventory = new AgentInventory(); |
257 | userInventory.CreateRootFolder(userID, false); | 257 | userInventory.CreateRootFolder(userID, false); |
258 | 258 | ||
259 | ArrayList AgentInventoryArray = new ArrayList(); | 259 | ArrayList AgentInventoryArray = new ArrayList(); |
260 | Hashtable TempHash; | 260 | Hashtable TempHash; |
261 | foreach (InventoryFolder InvFolder in userInventory.InventoryFolders.Values) | 261 | foreach (InventoryFolder InvFolder in userInventory.InventoryFolders.Values) |
262 | { | 262 | { |
263 | TempHash = new Hashtable(); | 263 | TempHash = new Hashtable(); |
264 | TempHash["name"] = InvFolder.FolderName; | 264 | TempHash["name"] = InvFolder.FolderName; |
265 | TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); | 265 | TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated(); |
266 | TempHash["version"] = (Int32)InvFolder.Version; | 266 | TempHash["version"] = (Int32)InvFolder.Version; |
267 | TempHash["type_default"] = (Int32)InvFolder.DefaultType; | 267 | TempHash["type_default"] = (Int32)InvFolder.DefaultType; |
268 | TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); | 268 | TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated(); |
269 | AgentInventoryArray.Add(TempHash); | 269 | AgentInventoryArray.Add(TempHash); |
270 | } | 270 | } |
271 | 271 | ||
272 | return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID); | 272 | return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID); |
273 | } | 273 | } |
274 | 274 | ||
275 | public class InventoryData | 275 | public class InventoryData |
276 | { | 276 | { |
277 | public ArrayList InventoryArray = null; | 277 | public ArrayList InventoryArray = null; |
278 | public LLUUID RootFolderID = LLUUID.Zero; | 278 | public LLUUID RootFolderID = LLUUID.Zero; |
279 | 279 | ||
280 | public InventoryData(ArrayList invList, LLUUID rootID) | 280 | public InventoryData(ArrayList invList, LLUUID rootID) |
281 | { | 281 | { |
282 | InventoryArray = invList; | 282 | InventoryArray = invList; |
283 | RootFolderID = rootID; | 283 | RootFolderID = rootID; |
284 | } | 284 | } |
285 | } | 285 | } |
286 | } | 286 | } |
287 | } | 287 | } |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 56ed959..d04101c 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.UserManagement | |||
96 | try | 96 | try |
97 | { | 97 | { |
98 | UserProfileData profile = plugin.Value.GetUserByUUID(uuid); | 98 | UserProfileData profile = plugin.Value.GetUserByUUID(uuid); |
99 | profile.currentAgent = getUserAgent(profile.UUID); | 99 | profile.CurrentAgent = getUserAgent(profile.UUID); |
100 | return profile; | 100 | return profile; |
101 | } | 101 | } |
102 | catch (Exception e) | 102 | catch (Exception e) |
@@ -121,7 +121,7 @@ namespace OpenSim.Framework.UserManagement | |||
121 | try | 121 | try |
122 | { | 122 | { |
123 | UserProfileData profile = plugin.Value.GetUserByName(name); | 123 | UserProfileData profile = plugin.Value.GetUserByName(name); |
124 | profile.currentAgent = getUserAgent(profile.UUID); | 124 | profile.CurrentAgent = getUserAgent(profile.UUID); |
125 | return profile; | 125 | return profile; |
126 | } | 126 | } |
127 | catch (Exception e) | 127 | catch (Exception e) |
@@ -148,7 +148,7 @@ namespace OpenSim.Framework.UserManagement | |||
148 | { | 148 | { |
149 | UserProfileData profile = plugin.Value.GetUserByName(fname,lname); | 149 | UserProfileData profile = plugin.Value.GetUserByName(fname,lname); |
150 | 150 | ||
151 | profile.currentAgent = getUserAgent(profile.UUID); | 151 | profile.CurrentAgent = getUserAgent(profile.UUID); |
152 | 152 | ||
153 | return profile; | 153 | return profile; |
154 | } | 154 | } |
@@ -233,7 +233,7 @@ namespace OpenSim.Framework.UserManagement | |||
233 | public void clearUserAgent(LLUUID agentID) | 233 | public void clearUserAgent(LLUUID agentID) |
234 | { | 234 | { |
235 | UserProfileData profile = GetUserProfile(agentID); | 235 | UserProfileData profile = GetUserProfile(agentID); |
236 | profile.currentAgent = null; | 236 | profile.CurrentAgent = null; |
237 | setUserProfile(profile); | 237 | setUserProfile(profile); |
238 | } | 238 | } |
239 | 239 | ||
@@ -292,8 +292,8 @@ namespace OpenSim.Framework.UserManagement | |||
292 | agent.UUID = profile.UUID; | 292 | agent.UUID = profile.UUID; |
293 | 293 | ||
294 | // Current position (from Home) | 294 | // Current position (from Home) |
295 | agent.currentHandle = profile.homeRegion; | 295 | agent.currentHandle = profile.HomeRegion; |
296 | agent.currentPos = profile.homeLocation; | 296 | agent.currentPos = profile.HomeLocation; |
297 | 297 | ||
298 | // If user specified additional start, use that | 298 | // If user specified additional start, use that |
299 | if (requestData.ContainsKey("start")) | 299 | if (requestData.ContainsKey("start")) |
@@ -326,7 +326,7 @@ namespace OpenSim.Framework.UserManagement | |||
326 | agent.regionID = new LLUUID(); // Fill in later | 326 | agent.regionID = new LLUUID(); // Fill in later |
327 | agent.currentRegion = new LLUUID(); // Fill in later | 327 | agent.currentRegion = new LLUUID(); // Fill in later |
328 | 328 | ||
329 | profile.currentAgent = agent; | 329 | profile.CurrentAgent = agent; |
330 | } | 330 | } |
331 | 331 | ||
332 | /// <summary> | 332 | /// <summary> |
@@ -349,16 +349,16 @@ namespace OpenSim.Framework.UserManagement | |||
349 | public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) | 349 | public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) |
350 | { | 350 | { |
351 | UserProfileData user = new UserProfileData(); | 351 | UserProfileData user = new UserProfileData(); |
352 | user.homeLocation = new LLVector3(128, 128, 100); | 352 | user.HomeLocation = new LLVector3(128, 128, 100); |
353 | user.UUID = LLUUID.Random(); | 353 | user.UUID = LLUUID.Random(); |
354 | user.username = firstName; | 354 | user.Firstname = firstName; |
355 | user.surname = lastName; | 355 | user.Lastname = lastName; |
356 | user.passwordHash = pass; | 356 | user.PasswordHash = pass; |
357 | user.passwordSalt = ""; | 357 | user.PasswordSalt = ""; |
358 | user.created = Util.UnixTimeSinceEpoch(); | 358 | user.Created = Util.UnixTimeSinceEpoch(); |
359 | user.homeLookAt = new LLVector3(100, 100, 100); | 359 | user.HomeLookAt = new LLVector3(100, 100, 100); |
360 | user.homeRegionX = regX; | 360 | user.HomeRegionX = regX; |
361 | user.homeRegionY = regY; | 361 | user.HomeRegionY = regY; |
362 | 362 | ||
363 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) | 363 | foreach (KeyValuePair<string, IUserData> plugin in _plugins) |
364 | { | 364 | { |
diff --git a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs index 38f1b55..e6a856d 100644 --- a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs +++ b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs | |||
@@ -83,7 +83,7 @@ namespace OpenSim.Framework.Data.DB4o | |||
83 | { | 83 | { |
84 | foreach (UserProfileData profile in manager.userProfiles.Values) | 84 | foreach (UserProfileData profile in manager.userProfiles.Values) |
85 | { | 85 | { |
86 | if (profile.username == fname && profile.surname == lname) | 86 | if (profile.Firstname == fname && profile.Lastname == lname) |
87 | return profile; | 87 | return profile; |
88 | } | 88 | } |
89 | return null; | 89 | return null; |
@@ -98,7 +98,7 @@ namespace OpenSim.Framework.Data.DB4o | |||
98 | { | 98 | { |
99 | try | 99 | try |
100 | { | 100 | { |
101 | return GetUserByUUID(uuid).currentAgent; | 101 | return GetUserByUUID(uuid).CurrentAgent; |
102 | } | 102 | } |
103 | catch (Exception) | 103 | catch (Exception) |
104 | { | 104 | { |
@@ -126,7 +126,7 @@ namespace OpenSim.Framework.Data.DB4o | |||
126 | { | 126 | { |
127 | try | 127 | try |
128 | { | 128 | { |
129 | return GetUserByName(fname,lname).currentAgent; | 129 | return GetUserByName(fname,lname).CurrentAgent; |
130 | } | 130 | } |
131 | catch (Exception) | 131 | catch (Exception) |
132 | { | 132 | { |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs index a83ee45..e733a83 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs | |||
@@ -313,36 +313,36 @@ namespace OpenSim.Framework.Data.MySQL | |||
313 | if (reader.Read()) | 313 | if (reader.Read()) |
314 | { | 314 | { |
315 | retval.UUID = new LLUUID((string)reader["UUID"]); | 315 | retval.UUID = new LLUUID((string)reader["UUID"]); |
316 | retval.username = (string)reader["username"]; | 316 | retval.Firstname = (string)reader["username"]; |
317 | retval.surname = (string)reader["lastname"]; | 317 | retval.Lastname = (string)reader["lastname"]; |
318 | 318 | ||
319 | retval.passwordHash = (string)reader["passwordHash"]; | 319 | retval.PasswordHash = (string)reader["passwordHash"]; |
320 | retval.passwordSalt = (string)reader["passwordSalt"]; | 320 | retval.PasswordSalt = (string)reader["passwordSalt"]; |
321 | 321 | ||
322 | retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); | 322 | retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); |
323 | retval.homeLocation = new LLVector3( | 323 | retval.HomeLocation = new LLVector3( |
324 | Convert.ToSingle(reader["homeLocationX"].ToString()), | 324 | Convert.ToSingle(reader["homeLocationX"].ToString()), |
325 | Convert.ToSingle(reader["homeLocationY"].ToString()), | 325 | Convert.ToSingle(reader["homeLocationY"].ToString()), |
326 | Convert.ToSingle(reader["homeLocationZ"].ToString())); | 326 | Convert.ToSingle(reader["homeLocationZ"].ToString())); |
327 | retval.homeLookAt = new LLVector3( | 327 | retval.HomeLookAt = new LLVector3( |
328 | Convert.ToSingle(reader["homeLookAtX"].ToString()), | 328 | Convert.ToSingle(reader["homeLookAtX"].ToString()), |
329 | Convert.ToSingle(reader["homeLookAtY"].ToString()), | 329 | Convert.ToSingle(reader["homeLookAtY"].ToString()), |
330 | Convert.ToSingle(reader["homeLookAtZ"].ToString())); | 330 | Convert.ToSingle(reader["homeLookAtZ"].ToString())); |
331 | 331 | ||
332 | retval.created = Convert.ToInt32(reader["created"].ToString()); | 332 | retval.Created = Convert.ToInt32(reader["created"].ToString()); |
333 | retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); | 333 | retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); |
334 | 334 | ||
335 | retval.userInventoryURI = (string)reader["userInventoryURI"]; | 335 | retval.UserInventoryUri = (string)reader["userInventoryURI"]; |
336 | retval.userAssetURI = (string)reader["userAssetURI"]; | 336 | retval.UserAssetUri = (string)reader["userAssetURI"]; |
337 | 337 | ||
338 | retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); | 338 | retval.ProfileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); |
339 | retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); | 339 | retval.ProfileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); |
340 | 340 | ||
341 | retval.profileAboutText = (string)reader["profileAboutText"]; | 341 | retval.ProfileAboutText = (string)reader["profileAboutText"]; |
342 | retval.profileFirstText = (string)reader["profileFirstText"]; | 342 | retval.ProfileFirstText = (string)reader["profileFirstText"]; |
343 | 343 | ||
344 | retval.profileImage = new LLUUID((string)reader["profileImage"]); | 344 | retval.ProfileImage = new LLUUID((string)reader["profileImage"]); |
345 | retval.profileFirstImage = new LLUUID((string)reader["profileFirstImage"]); | 345 | retval.ProfileFirstImage = new LLUUID((string)reader["profileFirstImage"]); |
346 | 346 | ||
347 | } | 347 | } |
348 | else | 348 | else |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs index 301550f..ae24367 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs | |||
@@ -204,9 +204,9 @@ namespace OpenSim.Framework.Data.MySQL | |||
204 | { | 204 | { |
205 | lock (database) | 205 | lock (database) |
206 | { | 206 | { |
207 | database.insertUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt, user.homeRegion, user.homeLocation.X, user.homeLocation.Y, user.homeLocation.Z, | 207 | database.insertUserRow(user.UUID, user.Firstname, user.Lastname, user.PasswordHash, user.PasswordSalt, user.HomeRegion, user.HomeLocation.X, user.HomeLocation.Y, user.HomeLocation.Z, |
208 | user.homeLookAt.X, user.homeLookAt.Y, user.homeLookAt.Z, user.created, user.lastLogin, user.userInventoryURI, user.userAssetURI, user.profileCanDoMask, user.profileWantDoMask, | 208 | user.HomeLookAt.X, user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created, user.LastLogin, user.UserInventoryUri, user.UserAssetUri, user.ProfileCanDoMask, user.ProfileWantDoMask, |
209 | user.profileAboutText, user.profileFirstText, user.profileImage, user.profileFirstImage); | 209 | user.ProfileAboutText, user.ProfileFirstText, user.ProfileImage, user.ProfileFirstImage); |
210 | } | 210 | } |
211 | } | 211 | } |
212 | catch (Exception e) | 212 | catch (Exception e) |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs index c7b7659..1899733 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | |||
@@ -85,7 +85,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
85 | UserProfileData user = buildUserProfile(row); | 85 | UserProfileData user = buildUserProfile(row); |
86 | row = ds.Tables["useragents"].Rows.Find(uuid); | 86 | row = ds.Tables["useragents"].Rows.Find(uuid); |
87 | if(row != null) { | 87 | if(row != null) { |
88 | user.currentAgent = buildUserAgent(row); | 88 | user.CurrentAgent = buildUserAgent(row); |
89 | } | 89 | } |
90 | return user; | 90 | return user; |
91 | } else { | 91 | } else { |
@@ -119,7 +119,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
119 | UserProfileData user = buildUserProfile(rows[0]); | 119 | UserProfileData user = buildUserProfile(rows[0]); |
120 | DataRow row = ds.Tables["useragents"].Rows.Find(user.UUID); | 120 | DataRow row = ds.Tables["useragents"].Rows.Find(user.UUID); |
121 | if(row != null) { | 121 | if(row != null) { |
122 | user.currentAgent = buildUserAgent(row); | 122 | user.CurrentAgent = buildUserAgent(row); |
123 | } | 123 | } |
124 | return user; | 124 | return user; |
125 | } else { | 125 | } else { |
@@ -137,7 +137,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
137 | { | 137 | { |
138 | try | 138 | try |
139 | { | 139 | { |
140 | return GetUserByUUID(uuid).currentAgent; | 140 | return GetUserByUUID(uuid).CurrentAgent; |
141 | } | 141 | } |
142 | catch (Exception) | 142 | catch (Exception) |
143 | { | 143 | { |
@@ -165,7 +165,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
165 | { | 165 | { |
166 | try | 166 | try |
167 | { | 167 | { |
168 | return GetUserByName(fname,lname).currentAgent; | 168 | return GetUserByName(fname,lname).CurrentAgent; |
169 | } | 169 | } |
170 | catch (Exception) | 170 | catch (Exception) |
171 | { | 171 | { |
@@ -193,18 +193,18 @@ namespace OpenSim.Framework.Data.SQLite | |||
193 | fillUserRow(row, user); | 193 | fillUserRow(row, user); |
194 | } | 194 | } |
195 | 195 | ||
196 | if(user.currentAgent != null) { | 196 | if(user.CurrentAgent != null) { |
197 | DataTable ua = ds.Tables["useragents"]; | 197 | DataTable ua = ds.Tables["useragents"]; |
198 | row = ua.Rows.Find(user.UUID); | 198 | row = ua.Rows.Find(user.UUID); |
199 | if (row == null) | 199 | if (row == null) |
200 | { | 200 | { |
201 | row = ua.NewRow(); | 201 | row = ua.NewRow(); |
202 | fillUserAgentRow(row, user.currentAgent); | 202 | fillUserAgentRow(row, user.CurrentAgent); |
203 | ua.Rows.Add(row); | 203 | ua.Rows.Add(row); |
204 | } | 204 | } |
205 | else | 205 | else |
206 | { | 206 | { |
207 | fillUserAgentRow(row, user.currentAgent); | 207 | fillUserAgentRow(row, user.CurrentAgent); |
208 | } | 208 | } |
209 | } | 209 | } |
210 | MainLog.Instance.Verbose("Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored"); | 210 | MainLog.Instance.Verbose("Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored"); |
@@ -317,8 +317,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
317 | createCol(users, "userInventoryURI", typeof(System.String)); | 317 | createCol(users, "userInventoryURI", typeof(System.String)); |
318 | createCol(users, "userAssetURI", typeof(System.String)); | 318 | createCol(users, "userAssetURI", typeof(System.String)); |
319 | createCol(users, "profileCanDoMask", typeof(System.Int32)); | 319 | createCol(users, "profileCanDoMask", typeof(System.Int32)); |
320 | createCol(users, "profileWantDoMask", typeof(System.Int32)); | 320 | createCol(users, "ProfileWantDoMask", typeof(System.Int32)); |
321 | createCol(users, "profileAboutText", typeof(System.String)); | 321 | createCol(users, "ProfileAboutText", typeof(System.String)); |
322 | createCol(users, "profileFirstText", typeof(System.String)); | 322 | createCol(users, "profileFirstText", typeof(System.String)); |
323 | createCol(users, "profileImage", typeof(System.String)); | 323 | createCol(users, "profileImage", typeof(System.String)); |
324 | createCol(users, "profileFirstImage", typeof(System.String)); | 324 | createCol(users, "profileFirstImage", typeof(System.String)); |
@@ -367,66 +367,66 @@ namespace OpenSim.Framework.Data.SQLite | |||
367 | // back out. Not enough time to figure it out yet. | 367 | // back out. Not enough time to figure it out yet. |
368 | UserProfileData user = new UserProfileData(); | 368 | UserProfileData user = new UserProfileData(); |
369 | user.UUID = new LLUUID((String)row["UUID"]); | 369 | user.UUID = new LLUUID((String)row["UUID"]); |
370 | user.username = (String)row["username"]; | 370 | user.Firstname = (String)row["username"]; |
371 | user.surname = (String)row["surname"]; | 371 | user.Lastname = (String)row["surname"]; |
372 | user.passwordHash = (String)row["passwordHash"]; | 372 | user.PasswordHash = (String)row["passwordHash"]; |
373 | user.passwordSalt = (String)row["passwordSalt"]; | 373 | user.PasswordSalt = (String)row["passwordSalt"]; |
374 | 374 | ||
375 | user.homeRegionX = Convert.ToUInt32(row["homeRegionX"]); | 375 | user.HomeRegionX = Convert.ToUInt32(row["homeRegionX"]); |
376 | user.homeRegionY = Convert.ToUInt32(row["homeRegionY"]); | 376 | user.HomeRegionY = Convert.ToUInt32(row["homeRegionY"]); |
377 | user.homeLocation = new LLVector3( | 377 | user.HomeLocation = new LLVector3( |
378 | Convert.ToSingle(row["homeLocationX"]), | 378 | Convert.ToSingle(row["homeLocationX"]), |
379 | Convert.ToSingle(row["homeLocationY"]), | 379 | Convert.ToSingle(row["homeLocationY"]), |
380 | Convert.ToSingle(row["homeLocationZ"]) | 380 | Convert.ToSingle(row["homeLocationZ"]) |
381 | ); | 381 | ); |
382 | user.homeLookAt = new LLVector3( | 382 | user.HomeLookAt = new LLVector3( |
383 | Convert.ToSingle(row["homeLookAtX"]), | 383 | Convert.ToSingle(row["homeLookAtX"]), |
384 | Convert.ToSingle(row["homeLookAtY"]), | 384 | Convert.ToSingle(row["homeLookAtY"]), |
385 | Convert.ToSingle(row["homeLookAtZ"]) | 385 | Convert.ToSingle(row["homeLookAtZ"]) |
386 | ); | 386 | ); |
387 | user.created = Convert.ToInt32(row["created"]); | 387 | user.Created = Convert.ToInt32(row["created"]); |
388 | user.lastLogin = Convert.ToInt32(row["lastLogin"]); | 388 | user.LastLogin = Convert.ToInt32(row["lastLogin"]); |
389 | user.rootInventoryFolderID = new LLUUID((String)row["rootInventoryFolderID"]); | 389 | user.RootInventoryFolderId = new LLUUID((String)row["rootInventoryFolderID"]); |
390 | user.userInventoryURI = (String)row["userInventoryURI"]; | 390 | user.UserInventoryUri = (String)row["userInventoryURI"]; |
391 | user.userAssetURI = (String)row["userAssetURI"]; | 391 | user.UserAssetUri = (String)row["userAssetURI"]; |
392 | user.profileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); | 392 | user.ProfileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); |
393 | user.profileWantDoMask = Convert.ToUInt32(row["profileWantDoMask"]); | 393 | user.ProfileWantDoMask = Convert.ToUInt32(row["ProfileWantDoMask"]); |
394 | user.profileAboutText = (String)row["profileAboutText"]; | 394 | user.ProfileAboutText = (String)row["ProfileAboutText"]; |
395 | user.profileFirstText = (String)row["profileFirstText"]; | 395 | user.ProfileFirstText = (String)row["profileFirstText"]; |
396 | user.profileImage = new LLUUID((String)row["profileImage"]); | 396 | user.ProfileImage = new LLUUID((String)row["profileImage"]); |
397 | user.profileFirstImage = new LLUUID((String)row["profileFirstImage"]); | 397 | user.ProfileFirstImage = new LLUUID((String)row["profileFirstImage"]); |
398 | return user; | 398 | return user; |
399 | } | 399 | } |
400 | 400 | ||
401 | private void fillUserRow(DataRow row, UserProfileData user) | 401 | private void fillUserRow(DataRow row, UserProfileData user) |
402 | { | 402 | { |
403 | row["UUID"] = user.UUID; | 403 | row["UUID"] = user.UUID; |
404 | row["username"] = user.username; | 404 | row["username"] = user.Firstname; |
405 | row["surname"] = user.surname; | 405 | row["surname"] = user.Lastname; |
406 | row["passwordHash"] = user.passwordHash; | 406 | row["passwordHash"] = user.PasswordHash; |
407 | row["passwordSalt"] = user.passwordSalt; | 407 | row["passwordSalt"] = user.PasswordSalt; |
408 | 408 | ||
409 | 409 | ||
410 | row["homeRegionX"] = user.homeRegionX; | 410 | row["homeRegionX"] = user.HomeRegionX; |
411 | row["homeRegionY"] = user.homeRegionY; | 411 | row["homeRegionY"] = user.HomeRegionY; |
412 | row["homeLocationX"] = user.homeLocation.X; | 412 | row["homeLocationX"] = user.HomeLocation.X; |
413 | row["homeLocationY"] = user.homeLocation.Y; | 413 | row["homeLocationY"] = user.HomeLocation.Y; |
414 | row["homeLocationZ"] = user.homeLocation.Z; | 414 | row["homeLocationZ"] = user.HomeLocation.Z; |
415 | row["homeLookAtX"] = user.homeLookAt.X; | 415 | row["homeLookAtX"] = user.HomeLookAt.X; |
416 | row["homeLookAtY"] = user.homeLookAt.Y; | 416 | row["homeLookAtY"] = user.HomeLookAt.Y; |
417 | row["homeLookAtZ"] = user.homeLookAt.Z; | 417 | row["homeLookAtZ"] = user.HomeLookAt.Z; |
418 | 418 | ||
419 | row["created"] = user.created; | 419 | row["created"] = user.Created; |
420 | row["lastLogin"] = user.lastLogin; | 420 | row["lastLogin"] = user.LastLogin; |
421 | row["rootInventoryFolderID"] = user.rootInventoryFolderID; | 421 | row["rootInventoryFolderID"] = user.RootInventoryFolderId; |
422 | row["userInventoryURI"] = user.userInventoryURI; | 422 | row["userInventoryURI"] = user.UserInventoryUri; |
423 | row["userAssetURI"] = user.userAssetURI; | 423 | row["userAssetURI"] = user.UserAssetUri; |
424 | row["profileCanDoMask"] = user.profileCanDoMask; | 424 | row["profileCanDoMask"] = user.ProfileCanDoMask; |
425 | row["profileWantDoMask"] = user.profileWantDoMask; | 425 | row["ProfileWantDoMask"] = user.ProfileWantDoMask; |
426 | row["profileAboutText"] = user.profileAboutText; | 426 | row["ProfileAboutText"] = user.ProfileAboutText; |
427 | row["profileFirstText"] = user.profileFirstText; | 427 | row["profileFirstText"] = user.ProfileFirstText; |
428 | row["profileImage"] = user.profileImage; | 428 | row["profileImage"] = user.ProfileImage; |
429 | row["profileFirstImage"] = user.profileFirstImage; | 429 | row["profileFirstImage"] = user.ProfileFirstImage; |
430 | 430 | ||
431 | // ADO.NET doesn't handle NULL very well | 431 | // ADO.NET doesn't handle NULL very well |
432 | foreach (DataColumn col in ds.Tables["users"].Columns) { | 432 | foreach (DataColumn col in ds.Tables["users"].Columns) { |
diff --git a/OpenSim/Framework/General/Types/UserProfileData.cs b/OpenSim/Framework/General/Types/UserProfileData.cs index 20d8224..7996975 100644 --- a/OpenSim/Framework/General/Types/UserProfileData.cs +++ b/OpenSim/Framework/General/Types/UserProfileData.cs | |||
@@ -43,94 +43,94 @@ namespace OpenSim.Framework.Types | |||
43 | /// <summary> | 43 | /// <summary> |
44 | /// The first component of a users account name | 44 | /// The first component of a users account name |
45 | /// </summary> | 45 | /// </summary> |
46 | public string username; | 46 | public string Firstname; |
47 | /// <summary> | 47 | /// <summary> |
48 | /// The second component of a users account name | 48 | /// The second component of a users account name |
49 | /// </summary> | 49 | /// </summary> |
50 | public string surname; | 50 | public string Lastname; |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) | 53 | /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) |
54 | /// </summary> | 54 | /// </summary> |
55 | /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks> | 55 | /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks> |
56 | public string passwordHash; | 56 | public string PasswordHash; |
57 | /// <summary> | 57 | /// <summary> |
58 | /// The salt used for the users hash, should be 32 bytes or longer | 58 | /// The salt used for the users hash, should be 32 bytes or longer |
59 | /// </summary> | 59 | /// </summary> |
60 | public string passwordSalt; | 60 | public string PasswordSalt; |
61 | 61 | ||
62 | /// <summary> | 62 | /// <summary> |
63 | /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into | 63 | /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into |
64 | /// </summary> | 64 | /// </summary> |
65 | public ulong homeRegion | 65 | public ulong HomeRegion |
66 | { | 66 | { |
67 | get { return Helpers.UIntsToLong((homeRegionX * 256), (homeRegionY * 256)); } | 67 | get { return Helpers.UIntsToLong((HomeRegionX * 256), (HomeRegionY * 256)); } |
68 | set { | 68 | set { |
69 | homeRegionX = (uint)(value >> 40); | 69 | HomeRegionX = (uint)(value >> 40); |
70 | homeRegionY = (((uint)(value)) >> 8); | 70 | HomeRegionY = (((uint)(value)) >> 8); |
71 | } | 71 | } |
72 | } | 72 | } |
73 | public uint homeRegionX; | 73 | public uint HomeRegionX; |
74 | public uint homeRegionY; | 74 | public uint HomeRegionY; |
75 | /// <summary> | 75 | /// <summary> |
76 | /// The coordinates inside the region of the home location | 76 | /// The coordinates inside the region of the home location |
77 | /// </summary> | 77 | /// </summary> |
78 | public LLVector3 homeLocation; | 78 | public LLVector3 HomeLocation; |
79 | /// <summary> | 79 | /// <summary> |
80 | /// Where the user will be looking when they rez. | 80 | /// Where the user will be looking when they rez. |
81 | /// </summary> | 81 | /// </summary> |
82 | public LLVector3 homeLookAt; | 82 | public LLVector3 HomeLookAt; |
83 | 83 | ||
84 | /// <summary> | 84 | /// <summary> |
85 | /// A UNIX Timestamp (seconds since epoch) for the users creation | 85 | /// A UNIX Timestamp (seconds since epoch) for the users creation |
86 | /// </summary> | 86 | /// </summary> |
87 | public int created; | 87 | public int Created; |
88 | /// <summary> | 88 | /// <summary> |
89 | /// A UNIX Timestamp for the users last login date / time | 89 | /// A UNIX Timestamp for the users last login date / time |
90 | /// </summary> | 90 | /// </summary> |
91 | public int lastLogin; | 91 | public int LastLogin; |
92 | 92 | ||
93 | public LLUUID rootInventoryFolderID; | 93 | public LLUUID RootInventoryFolderId; |
94 | 94 | ||
95 | /// <summary> | 95 | /// <summary> |
96 | /// A URI to the users inventory server, used for foreigners and large grids | 96 | /// A URI to the users inventory server, used for foreigners and large grids |
97 | /// </summary> | 97 | /// </summary> |
98 | public string userInventoryURI = String.Empty; | 98 | public string UserInventoryUri = String.Empty; |
99 | /// <summary> | 99 | /// <summary> |
100 | /// A URI to the users asset server, used for foreigners and large grids. | 100 | /// A URI to the users asset server, used for foreigners and large grids. |
101 | /// </summary> | 101 | /// </summary> |
102 | public string userAssetURI = String.Empty; | 102 | public string UserAssetUri = String.Empty; |
103 | 103 | ||
104 | /// <summary> | 104 | /// <summary> |
105 | /// A uint mask containing the "I can do" fields of the users profile | 105 | /// A uint mask containing the "I can do" fields of the users profile |
106 | /// </summary> | 106 | /// </summary> |
107 | public uint profileCanDoMask; | 107 | public uint ProfileCanDoMask; |
108 | /// <summary> | 108 | /// <summary> |
109 | /// A uint mask containing the "I want to do" part of the users profile | 109 | /// A uint mask containing the "I want to do" part of the users profile |
110 | /// </summary> | 110 | /// </summary> |
111 | public uint profileWantDoMask; // Profile window "I want to" mask | 111 | public uint ProfileWantDoMask; // Profile window "I want to" mask |
112 | 112 | ||
113 | /// <summary> | 113 | /// <summary> |
114 | /// The about text listed in a users profile. | 114 | /// The about text listed in a users profile. |
115 | /// </summary> | 115 | /// </summary> |
116 | public string profileAboutText = String.Empty; | 116 | public string ProfileAboutText = String.Empty; |
117 | /// <summary> | 117 | /// <summary> |
118 | /// The first life about text listed in a users profile | 118 | /// The first life about text listed in a users profile |
119 | /// </summary> | 119 | /// </summary> |
120 | public string profileFirstText = String.Empty; | 120 | public string ProfileFirstText = String.Empty; |
121 | 121 | ||
122 | /// <summary> | 122 | /// <summary> |
123 | /// The profile image for an avatar stored on the asset server | 123 | /// The profile image for an avatar stored on the asset server |
124 | /// </summary> | 124 | /// </summary> |
125 | public LLUUID profileImage; | 125 | public LLUUID ProfileImage; |
126 | /// <summary> | 126 | /// <summary> |
127 | /// The profile image for the users first life tab | 127 | /// The profile image for the users first life tab |
128 | /// </summary> | 128 | /// </summary> |
129 | public LLUUID profileFirstImage; | 129 | public LLUUID ProfileFirstImage; |
130 | /// <summary> | 130 | /// <summary> |
131 | /// The users last registered agent (filled in on the user server) | 131 | /// The users last registered agent (filled in on the user server) |
132 | /// </summary> | 132 | /// </summary> |
133 | public UserAgentData currentAgent; | 133 | public UserAgentData CurrentAgent; |
134 | } | 134 | } |
135 | 135 | ||
136 | /// <summary> | 136 | /// <summary> |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index b42427b..120d90c 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -29,13 +29,13 @@ namespace OpenSim.Grid.UserServer | |||
29 | { | 29 | { |
30 | // Load information from the gridserver | 30 | // Load information from the gridserver |
31 | SimProfileData SimInfo = new SimProfileData(); | 31 | SimProfileData SimInfo = new SimProfileData(); |
32 | SimInfo = SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); | 32 | SimInfo = SimInfo.RequestSimProfileData(theUser.CurrentAgent.currentHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey); |
33 | 33 | ||
34 | // Customise the response | 34 | // Customise the response |
35 | // Home Location | 35 | // Home Location |
36 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.regionLocY * 256).ToString() + "], " + | 36 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.regionLocY * 256).ToString() + "], " + |
37 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + | 37 | "'position':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " + |
38 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | 38 | "'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; |
39 | 39 | ||
40 | // Destination | 40 | // Destination |
41 | Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY); | 41 | Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY); |
@@ -53,23 +53,23 @@ namespace OpenSim.Grid.UserServer | |||
53 | 53 | ||
54 | // Prepare notification | 54 | // Prepare notification |
55 | Hashtable SimParams = new Hashtable(); | 55 | Hashtable SimParams = new Hashtable(); |
56 | SimParams["session_id"] = theUser.currentAgent.sessionID.ToString(); | 56 | SimParams["session_id"] = theUser.CurrentAgent.sessionID.ToString(); |
57 | SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString(); | 57 | SimParams["secure_session_id"] = theUser.CurrentAgent.secureSessionID.ToString(); |
58 | SimParams["firstname"] = theUser.username; | 58 | SimParams["firstname"] = theUser.Firstname; |
59 | SimParams["lastname"] = theUser.surname; | 59 | SimParams["lastname"] = theUser.Lastname; |
60 | SimParams["agent_id"] = theUser.UUID.ToString(); | 60 | SimParams["agent_id"] = theUser.UUID.ToString(); |
61 | SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode); | 61 | SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode); |
62 | SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString(); | 62 | SimParams["startpos_x"] = theUser.CurrentAgent.currentPos.X.ToString(); |
63 | SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); | 63 | SimParams["startpos_y"] = theUser.CurrentAgent.currentPos.Y.ToString(); |
64 | SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); | 64 | SimParams["startpos_z"] = theUser.CurrentAgent.currentPos.Z.ToString(); |
65 | SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString(); | 65 | SimParams["regionhandle"] = theUser.CurrentAgent.currentHandle.ToString(); |
66 | SimParams["caps_path"] = capsPath; | 66 | SimParams["caps_path"] = capsPath; |
67 | ArrayList SendParams = new ArrayList(); | 67 | ArrayList SendParams = new ArrayList(); |
68 | SendParams.Add(SimParams); | 68 | SendParams.Add(SimParams); |
69 | 69 | ||
70 | // Update agent with target sim | 70 | // Update agent with target sim |
71 | theUser.currentAgent.currentRegion = SimInfo.UUID; | 71 | theUser.CurrentAgent.currentRegion = SimInfo.UUID; |
72 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; | 72 | theUser.CurrentAgent.currentHandle = SimInfo.regionHandle; |
73 | 73 | ||
74 | System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI); | 74 | System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI); |
75 | // Send | 75 | // Send |
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 5db4901..c2d0a7a 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -83,31 +83,31 @@ namespace OpenSim.Grid.UserServer | |||
83 | Hashtable responseData = new Hashtable(); | 83 | Hashtable responseData = new Hashtable(); |
84 | 84 | ||
85 | // Account information | 85 | // Account information |
86 | responseData["firstname"] = profile.username; | 86 | responseData["firstname"] = profile.Firstname; |
87 | responseData["lastname"] = profile.surname; | 87 | responseData["lastname"] = profile.Lastname; |
88 | responseData["uuid"] = profile.UUID.ToStringHyphenated(); | 88 | responseData["uuid"] = profile.UUID.ToStringHyphenated(); |
89 | // Server Information | 89 | // Server Information |
90 | responseData["server_inventory"] = profile.userInventoryURI; | 90 | responseData["server_inventory"] = profile.UserInventoryUri; |
91 | responseData["server_asset"] = profile.userAssetURI; | 91 | responseData["server_asset"] = profile.UserAssetUri; |
92 | // Profile Information | 92 | // Profile Information |
93 | responseData["profile_about"] = profile.profileAboutText; | 93 | responseData["profile_about"] = profile.ProfileAboutText; |
94 | responseData["profile_firstlife_about"] = profile.profileFirstText; | 94 | responseData["profile_firstlife_about"] = profile.ProfileFirstText; |
95 | responseData["profile_firstlife_image"] = profile.profileFirstImage.ToStringHyphenated(); | 95 | responseData["profile_firstlife_image"] = profile.ProfileFirstImage.ToStringHyphenated(); |
96 | responseData["profile_can_do"] = profile.profileCanDoMask.ToString(); | 96 | responseData["profile_can_do"] = profile.ProfileCanDoMask.ToString(); |
97 | responseData["profile_want_do"] = profile.profileWantDoMask.ToString(); | 97 | responseData["profile_want_do"] = profile.ProfileWantDoMask.ToString(); |
98 | responseData["profile_image"] = profile.profileImage.ToStringHyphenated(); | 98 | responseData["profile_image"] = profile.ProfileImage.ToStringHyphenated(); |
99 | responseData["profile_created"] = profile.created.ToString(); | 99 | responseData["profile_created"] = profile.Created.ToString(); |
100 | responseData["profile_lastlogin"] = profile.lastLogin.ToString(); | 100 | responseData["profile_lastlogin"] = profile.LastLogin.ToString(); |
101 | // Home region information | 101 | // Home region information |
102 | responseData["home_coordinates_x"] = profile.homeLocation.X.ToString(); | 102 | responseData["home_coordinates_x"] = profile.HomeLocation.X.ToString(); |
103 | responseData["home_coordinates_y"] = profile.homeLocation.Y.ToString(); | 103 | responseData["home_coordinates_y"] = profile.HomeLocation.Y.ToString(); |
104 | responseData["home_coordinates_z"] = profile.homeLocation.Z.ToString(); | 104 | responseData["home_coordinates_z"] = profile.HomeLocation.Z.ToString(); |
105 | 105 | ||
106 | responseData["home_region"] = profile.homeRegion.ToString(); | 106 | responseData["home_region"] = profile.HomeRegion.ToString(); |
107 | 107 | ||
108 | responseData["home_look_x"] = profile.homeLookAt.X.ToString(); | 108 | responseData["home_look_x"] = profile.HomeLookAt.X.ToString(); |
109 | responseData["home_look_y"] = profile.homeLookAt.Y.ToString(); | 109 | responseData["home_look_y"] = profile.HomeLookAt.Y.ToString(); |
110 | responseData["home_look_z"] = profile.homeLookAt.Z.ToString(); | 110 | responseData["home_look_z"] = profile.HomeLookAt.Z.ToString(); |
111 | response.Value = responseData; | 111 | response.Value = responseData; |
112 | 112 | ||
113 | return response; | 113 | return response; |
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 9835583..23cab48 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -70,26 +70,26 @@ namespace OpenSim.Region.Communications.Local | |||
70 | } | 70 | } |
71 | else | 71 | else |
72 | { | 72 | { |
73 | Console.WriteLine("Authenticating " + profile.username + " " + profile.surname); | 73 | Console.WriteLine("Authenticating " + profile.Firstname + " " + profile.Lastname); |
74 | 74 | ||
75 | password = password.Remove(0, 3); //remove $1$ | 75 | password = password.Remove(0, 3); //remove $1$ |
76 | 76 | ||
77 | string s = Util.Md5Hash(password + ":" + profile.passwordSalt); | 77 | string s = Util.Md5Hash(password + ":" + profile.PasswordSalt); |
78 | 78 | ||
79 | return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); | 79 | return profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase); |
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||
83 | public override void CustomiseResponse(LoginResponse response, UserProfileData theUser) | 83 | public override void CustomiseResponse(LoginResponse response, UserProfileData theUser) |
84 | { | 84 | { |
85 | ulong currentRegion = theUser.currentAgent.currentHandle; | 85 | ulong currentRegion = theUser.CurrentAgent.currentHandle; |
86 | RegionInfo reg = m_Parent.GridService.RequestNeighbourInfo(currentRegion); | 86 | RegionInfo reg = m_Parent.GridService.RequestNeighbourInfo(currentRegion); |
87 | 87 | ||
88 | if (reg != null) | 88 | if (reg != null) |
89 | { | 89 | { |
90 | response.Home = "{'region_handle':[r" + (reg.RegionLocX * 256).ToString() + ",r" + (reg.RegionLocY * 256).ToString() + "], " + | 90 | response.Home = "{'region_handle':[r" + (reg.RegionLocX * 256).ToString() + ",r" + (reg.RegionLocY * 256).ToString() + "], " + |
91 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + | 91 | "'position':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " + |
92 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | 92 | "'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}"; |
93 | string capsPath = Util.GetRandomCapsPath(); | 93 | string capsPath = Util.GetRandomCapsPath(); |
94 | response.SimAddress = reg.ExternalEndPoint.Address.ToString(); | 94 | response.SimAddress = reg.ExternalEndPoint.Address.ToString(); |
95 | response.SimPort = (Int32)reg.ExternalEndPoint.Port; | 95 | response.SimPort = (Int32)reg.ExternalEndPoint.Port; |
@@ -98,8 +98,8 @@ namespace OpenSim.Region.Communications.Local | |||
98 | 98 | ||
99 | response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; | 99 | response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; |
100 | // response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/"; | 100 | // response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/"; |
101 | theUser.currentAgent.currentRegion = reg.SimUUID; | 101 | theUser.CurrentAgent.currentRegion = reg.SimUUID; |
102 | theUser.currentAgent.currentHandle = reg.RegionHandle; | 102 | theUser.CurrentAgent.currentHandle = reg.RegionHandle; |
103 | 103 | ||
104 | Login _login = new Login(); | 104 | Login _login = new Login(); |
105 | //copy data to login object | 105 | //copy data to login object |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 32f39b4..80b6d74 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | |||
@@ -24,26 +24,26 @@ namespace OpenSim.Region.Communications.OGS1 | |||
24 | } | 24 | } |
25 | 25 | ||
26 | UserProfileData userData = new UserProfileData(); | 26 | UserProfileData userData = new UserProfileData(); |
27 | userData.username = (string)data["firstname"]; | 27 | userData.Firstname = (string)data["firstname"]; |
28 | userData.surname = (string)data["lastname"]; | 28 | userData.Lastname = (string)data["lastname"]; |
29 | userData.UUID = new LLUUID((string)data["uuid"]); | 29 | userData.UUID = new LLUUID((string)data["uuid"]); |
30 | userData.userInventoryURI = (string)data["server_inventory"]; | 30 | userData.UserInventoryUri = (string)data["server_inventory"]; |
31 | userData.userAssetURI = (string)data["server_asset"]; | 31 | userData.UserAssetUri = (string)data["server_asset"]; |
32 | userData.profileFirstText = (string)data["profile_firstlife_about"]; | 32 | userData.ProfileFirstText = (string)data["profile_firstlife_about"]; |
33 | userData.profileFirstImage = new LLUUID((string)data["profile_firstlife_image"]); | 33 | userData.ProfileFirstImage = new LLUUID((string)data["profile_firstlife_image"]); |
34 | userData.profileCanDoMask = Convert.ToUInt32((string)data["profile_can_do"]); | 34 | userData.ProfileCanDoMask = Convert.ToUInt32((string)data["profile_can_do"]); |
35 | userData.profileWantDoMask = Convert.ToUInt32(data["profile_want_do"]); | 35 | userData.ProfileWantDoMask = Convert.ToUInt32(data["profile_want_do"]); |
36 | userData.profileImage = new LLUUID((string)data["profile_image"]); | 36 | userData.ProfileImage = new LLUUID((string)data["profile_image"]); |
37 | userData.lastLogin = Convert.ToInt32((string)data["profile_lastlogin"]); | 37 | userData.LastLogin = Convert.ToInt32((string)data["profile_lastlogin"]); |
38 | userData.homeRegion = Convert.ToUInt64((string)data["home_region"]); | 38 | userData.HomeRegion = Convert.ToUInt64((string)data["home_region"]); |
39 | userData.homeLocation = new LLVector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), (float)Convert.ToDecimal((string)data["home_coordinates_y"]), (float)Convert.ToDecimal((string)data["home_coordinates_z"])); | 39 | userData.HomeLocation = new LLVector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), (float)Convert.ToDecimal((string)data["home_coordinates_y"]), (float)Convert.ToDecimal((string)data["home_coordinates_z"])); |
40 | userData.homeLookAt = new LLVector3((float)Convert.ToDecimal((string)data["home_look_x"]), (float)Convert.ToDecimal((string)data["home_look_y"]), (float)Convert.ToDecimal((string)data["home_look_z"])); | 40 | userData.HomeLookAt = new LLVector3((float)Convert.ToDecimal((string)data["home_look_x"]), (float)Convert.ToDecimal((string)data["home_look_y"]), (float)Convert.ToDecimal((string)data["home_look_z"])); |
41 | 41 | ||
42 | return userData; | 42 | return userData; |
43 | } | 43 | } |
44 | public UserProfileData GetUserProfile(string firstName, string lastName) | 44 | public UserProfileData GetUserProfile(string firstName, string lastName) |
45 | { | 45 | { |
46 | return GetUserProfile(firstName + " " + lastName); | 46 | return GetUserProfile(firstName, lastName); |
47 | } | 47 | } |
48 | public UserProfileData GetUserProfile(string name) | 48 | public UserProfileData GetUserProfile(string name) |
49 | { | 49 | { |