aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteUserData.cs102
1 files changed, 51 insertions, 51 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
index 1899733..c7b7659 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.Firstname = (String)row["username"]; 370 user.username = (String)row["username"];
371 user.Lastname = (String)row["surname"]; 371 user.surname = (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.Firstname; 404 row["username"] = user.username;
405 row["surname"] = user.Lastname; 405 row["surname"] = user.surname;
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) {