aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/UserManagerBase.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs68
1 files changed, 34 insertions, 34 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index a35ed72..5a63e70 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -31,8 +31,8 @@ using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Security.Cryptography; 33using System.Security.Cryptography;
34using libsecondlife; 34using OpenMetaverse;
35using libsecondlife.StructuredData; 35using OpenMetaverse.StructuredData;
36using log4net; 36using log4net;
37using Nwc.XmlRpc; 37using Nwc.XmlRpc;
38using OpenSim.Framework.Statistics; 38using OpenSim.Framework.Statistics;
@@ -59,7 +59,7 @@ namespace OpenSim.Framework.Communications
59 new PluginLoader<IUserDataPlugin> (new UserDataInitialiser (connect)); 59 new PluginLoader<IUserDataPlugin> (new UserDataInitialiser (connect));
60 60
61 // loader will try to load all providers (MySQL, MSSQL, etc) 61 // loader will try to load all providers (MySQL, MSSQL, etc)
62 // unless it is constrainted to the correct "Provider" entry in the addin.xml 62 // unless it is constrainted to the correct "Provider" entry in the addin.Xml
63 loader.Add ("/OpenSim/UserData", new PluginProviderFilter (provider)); 63 loader.Add ("/OpenSim/UserData", new PluginProviderFilter (provider));
64 loader.Load(); 64 loader.Load();
65 65
@@ -84,14 +84,14 @@ namespace OpenSim.Framework.Communications
84 84
85 return null; 85 return null;
86 } 86 }
87 public void ResetAttachments(LLUUID userID) 87 public void ResetAttachments(UUID userID)
88 { 88 {
89 foreach (IUserDataPlugin plugin in _plugins) 89 foreach (IUserDataPlugin plugin in _plugins)
90 { 90 {
91 plugin.ResetAttachments(userID); 91 plugin.ResetAttachments(userID);
92 } 92 }
93 } 93 }
94 public UserAgentData GetAgentByUUID(LLUUID userId) 94 public UserAgentData GetAgentByUUID(UUID userId)
95 { 95 {
96 foreach (IUserDataPlugin plugin in _plugins) 96 foreach (IUserDataPlugin plugin in _plugins)
97 { 97 {
@@ -106,7 +106,7 @@ namespace OpenSim.Framework.Communications
106 return null; 106 return null;
107 } 107 }
108 // see IUserService 108 // see IUserService
109 public UserProfileData GetUserProfile(LLUUID uuid) 109 public UserProfileData GetUserProfile(UUID uuid)
110 { 110 {
111 foreach (IUserDataPlugin plugin in _plugins) 111 foreach (IUserDataPlugin plugin in _plugins)
112 { 112 {
@@ -122,7 +122,7 @@ namespace OpenSim.Framework.Communications
122 return null; 122 return null;
123 } 123 }
124 124
125 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) 125 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query)
126 { 126 {
127 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); 127 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
128 foreach (IUserDataPlugin plugin in _plugins) 128 foreach (IUserDataPlugin plugin in _plugins)
@@ -172,7 +172,7 @@ namespace OpenSim.Framework.Communications
172 /// </summary> 172 /// </summary>
173 /// <param name="uuid">The agent's UUID</param> 173 /// <param name="uuid">The agent's UUID</param>
174 /// <returns>Agent profiles</returns> 174 /// <returns>Agent profiles</returns>
175 public UserAgentData GetUserAgent(LLUUID uuid) 175 public UserAgentData GetUserAgent(UUID uuid)
176 { 176 {
177 foreach (IUserDataPlugin plugin in _plugins) 177 foreach (IUserDataPlugin plugin in _plugins)
178 { 178 {
@@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications
234 return null; 234 return null;
235 } 235 }
236 236
237 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) 237 public void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle)
238 { 238 {
239 foreach (IUserDataPlugin plugin in _plugins) 239 foreach (IUserDataPlugin plugin in _plugins)
240 { 240 {
@@ -254,7 +254,7 @@ namespace OpenSim.Framework.Communications
254 /// </summary> 254 /// </summary>
255 /// <param name="name">the UUID of the friend list owner</param> 255 /// <param name="name">the UUID of the friend list owner</param>
256 /// <returns>A List of FriendListItems that contains info about the user's friends</returns> 256 /// <returns>A List of FriendListItems that contains info about the user's friends</returns>
257 public List<FriendListItem> GetUserFriendList(LLUUID ownerID) 257 public List<FriendListItem> GetUserFriendList(UUID ownerID)
258 { 258 {
259 foreach (IUserDataPlugin plugin in _plugins) 259 foreach (IUserDataPlugin plugin in _plugins)
260 { 260 {
@@ -271,7 +271,7 @@ namespace OpenSim.Framework.Communications
271 return null; 271 return null;
272 } 272 }
273 273
274 public void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) 274 public void StoreWebLoginKey(UUID agentID, UUID webLoginKey)
275 { 275 {
276 foreach (IUserDataPlugin plugin in _plugins) 276 foreach (IUserDataPlugin plugin in _plugins)
277 { 277 {
@@ -286,7 +286,7 @@ namespace OpenSim.Framework.Communications
286 } 286 }
287 } 287 }
288 288
289 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 289 public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
290 { 290 {
291 foreach (IUserDataPlugin plugin in _plugins) 291 foreach (IUserDataPlugin plugin in _plugins)
292 { 292 {
@@ -301,7 +301,7 @@ namespace OpenSim.Framework.Communications
301 } 301 }
302 } 302 }
303 303
304 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 304 public void RemoveUserFriend(UUID friendlistowner, UUID friend)
305 { 305 {
306 foreach (IUserDataPlugin plugin in _plugins) 306 foreach (IUserDataPlugin plugin in _plugins)
307 { 307 {
@@ -316,7 +316,7 @@ namespace OpenSim.Framework.Communications
316 } 316 }
317 } 317 }
318 318
319 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 319 public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
320 { 320 {
321 foreach (IUserDataPlugin plugin in _plugins) 321 foreach (IUserDataPlugin plugin in _plugins)
322 { 322 {
@@ -336,7 +336,7 @@ namespace OpenSim.Framework.Communications
336 /// Resets the currentAgent in the user profile 336 /// Resets the currentAgent in the user profile
337 /// </summary> 337 /// </summary>
338 /// <param name="agentID">The agent's ID</param> 338 /// <param name="agentID">The agent's ID</param>
339 public void ClearUserAgent(LLUUID agentID) 339 public void ClearUserAgent(UUID agentID)
340 { 340 {
341 UserProfileData profile = GetUserProfile(agentID); 341 UserProfileData profile = GetUserProfile(agentID);
342 342
@@ -382,8 +382,8 @@ namespace OpenSim.Framework.Communications
382 rand.GetBytes(randDataS); 382 rand.GetBytes(randDataS);
383 rand.GetBytes(randDataSS); 383 rand.GetBytes(randDataSS);
384 384
385 agent.SecureSessionID = new LLUUID(randDataSS, 0); 385 agent.SecureSessionID = new UUID(randDataSS, 0);
386 agent.SessionID = new LLUUID(randDataS, 0); 386 agent.SessionID = new UUID(randDataS, 0);
387 387
388 // Profile UUID 388 // Profile UUID
389 agent.ProfileID = profile.ID; 389 agent.ProfileID = profile.ID;
@@ -434,8 +434,8 @@ namespace OpenSim.Framework.Communications
434 agent.LogoutTime = 0; 434 agent.LogoutTime = 0;
435 435
436 // Current location 436 // Current location
437 agent.InitialRegion = LLUUID.Zero; // Fill in later 437 agent.InitialRegion = UUID.Zero; // Fill in later
438 agent.Region = LLUUID.Zero; // Fill in later 438 agent.Region = UUID.Zero; // Fill in later
439 439
440 profile.CurrentAgent = agent; 440 profile.CurrentAgent = agent;
441 } 441 }
@@ -449,14 +449,14 @@ namespace OpenSim.Framework.Communications
449 /// <param name="posx"></param> 449 /// <param name="posx"></param>
450 /// <param name="posy"></param> 450 /// <param name="posy"></param>
451 /// <param name="posz"></param> 451 /// <param name="posz"></param>
452 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz) 452 public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz)
453 { 453 {
454 if (StatsManager.UserStats != null) 454 if (StatsManager.UserStats != null)
455 StatsManager.UserStats.AddLogout(); 455 StatsManager.UserStats.AddLogout();
456 456
457 UserProfileData userProfile; 457 UserProfileData userProfile;
458 UserAgentData userAgent; 458 UserAgentData userAgent;
459 LLVector3 currentPos = new LLVector3(posx, posy, posz); 459 Vector3 currentPos = new Vector3(posx, posy, posz);
460 460
461 userProfile = GetUserProfile(userid); 461 userProfile = GetUserProfile(userid);
462 462
@@ -470,8 +470,8 @@ namespace OpenSim.Framework.Communications
470 { 470 {
471 userAgent.AgentOnline = false; 471 userAgent.AgentOnline = false;
472 userAgent.LogoutTime = Util.UnixTimeSinceEpoch(); 472 userAgent.LogoutTime = Util.UnixTimeSinceEpoch();
473 //userAgent.sessionID = LLUUID.Zero; 473 //userAgent.sessionID = UUID.Zero;
474 if (regionid != LLUUID.Zero) 474 if (regionid != UUID.Zero)
475 { 475 {
476 userAgent.Region = regionid; 476 userAgent.Region = regionid;
477 } 477 }
@@ -508,8 +508,8 @@ namespace OpenSim.Framework.Communications
508 rand.GetBytes(randDataS); 508 rand.GetBytes(randDataS);
509 rand.GetBytes(randDataSS); 509 rand.GetBytes(randDataSS);
510 510
511 agent.SecureSessionID = new LLUUID(randDataSS, 0); 511 agent.SecureSessionID = new UUID(randDataSS, 0);
512 agent.SessionID = new LLUUID(randDataS, 0); 512 agent.SessionID = new UUID(randDataS, 0);
513 513
514 // Profile UUID 514 // Profile UUID
515 agent.ProfileID = profile.ID; 515 agent.ProfileID = profile.ID;
@@ -523,8 +523,8 @@ namespace OpenSim.Framework.Communications
523 agent.LogoutTime = 0; 523 agent.LogoutTime = 0;
524 524
525 // Current location 525 // Current location
526 agent.InitialRegion = LLUUID.Zero; // Fill in later 526 agent.InitialRegion = UUID.Zero; // Fill in later
527 agent.Region = LLUUID.Zero; // Fill in later 527 agent.Region = UUID.Zero; // Fill in later
528 528
529 profile.CurrentAgent = agent; 529 profile.CurrentAgent = agent;
530 } 530 }
@@ -550,17 +550,17 @@ namespace OpenSim.Framework.Communications
550 /// 550 ///
551 /// </summary> 551 /// </summary>
552 /// <param name="user"></param> 552 /// <param name="user"></param>
553 public LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) 553 public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
554 { 554 {
555 UserProfileData user = new UserProfileData(); 555 UserProfileData user = new UserProfileData();
556 user.HomeLocation = new LLVector3(128, 128, 100); 556 user.HomeLocation = new Vector3(128, 128, 100);
557 user.ID = LLUUID.Random(); 557 user.ID = UUID.Random();
558 user.FirstName = firstName; 558 user.FirstName = firstName;
559 user.SurName = lastName; 559 user.SurName = lastName;
560 user.PasswordHash = pass; 560 user.PasswordHash = pass;
561 user.PasswordSalt = String.Empty; 561 user.PasswordSalt = String.Empty;
562 user.Created = Util.UnixTimeSinceEpoch(); 562 user.Created = Util.UnixTimeSinceEpoch();
563 user.HomeLookAt = new LLVector3(100, 100, 100); 563 user.HomeLookAt = new Vector3(100, 100, 100);
564 user.HomeRegionX = regX; 564 user.HomeRegionX = regX;
565 user.HomeRegionY = regY; 565 user.HomeRegionY = regY;
566 566
@@ -604,7 +604,7 @@ namespace OpenSim.Framework.Communications
604 604
605 public abstract UserProfileData SetupMasterUser(string firstName, string lastName); 605 public abstract UserProfileData SetupMasterUser(string firstName, string lastName);
606 public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password); 606 public abstract UserProfileData SetupMasterUser(string firstName, string lastName, string password);
607 public abstract UserProfileData SetupMasterUser(LLUUID uuid); 607 public abstract UserProfileData SetupMasterUser(UUID uuid);
608 608
609 /// <summary> 609 /// <summary>
610 /// Add agent to DB 610 /// Add agent to DB
@@ -629,7 +629,7 @@ namespace OpenSim.Framework.Communications
629 629
630 /// Appearance 630 /// Appearance
631 /// TODO: stubs for now to get us to a compiling state gently 631 /// TODO: stubs for now to get us to a compiling state gently
632 public AvatarAppearance GetUserAppearance(LLUUID user) 632 public AvatarAppearance GetUserAppearance(UUID user)
633 { 633 {
634 foreach (IUserDataPlugin plugin in _plugins) 634 foreach (IUserDataPlugin plugin in _plugins)
635 { 635 {
@@ -645,7 +645,7 @@ namespace OpenSim.Framework.Communications
645 return null; 645 return null;
646 } 646 }
647 647
648 public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 648 public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
649 { 649 {
650 foreach (IUserDataPlugin plugin in _plugins) 650 foreach (IUserDataPlugin plugin in _plugins)
651 { 651 {