aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-04-17 15:51:58 +0000
committerJustin Clarke Casey2009-04-17 15:51:58 +0000
commit765553d0984eff1a22243ced4a14c4bc98c6e2b7 (patch)
tree7ea30bfc0fde72a1434fab6d8fbff727cdf38141 /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
parent* Moved the DefaultConfig settings into already-existing ConfigSettings (diff)
downloadopensim-SC-765553d0984eff1a22243ced4a14c4bc98c6e2b7.zip
opensim-SC-765553d0984eff1a22243ced4a14c4bc98c6e2b7.tar.gz
opensim-SC-765553d0984eff1a22243ced4a14c4bc98c6e2b7.tar.bz2
opensim-SC-765553d0984eff1a22243ced4a14c4bc98c6e2b7.tar.xz
* Run RemoteAdminPlugin user info queries through cache service rather than direct
Diffstat (limited to '')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs28
1 files changed, 18 insertions, 10 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index 1a6deca..a7290b9 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -38,6 +38,7 @@ using Nwc.XmlRpc;
38using OpenMetaverse; 38using OpenMetaverse;
39using OpenSim; 39using OpenSim;
40using OpenSim.Framework; 40using OpenSim.Framework;
41using OpenSim.Framework.Communications.Cache;
41using OpenSim.Framework.Console; 42using OpenSim.Framework.Console;
42using OpenSim.Framework.Servers; 43using OpenSim.Framework.Servers;
43using OpenSim.Region.CoreModules.World.Terrain; 44using OpenSim.Region.CoreModules.World.Terrain;
@@ -555,8 +556,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
555 else 556 else
556 { 557 {
557 // no client supplied UUID: look it up... 558 // no client supplied UUID: look it up...
558 UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(masterFirst, masterLast); 559 CachedUserInfo userInfo
559 if (null == userProfile) 560 = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(
561 masterFirst, masterLast);
562
563 if (null == userInfo)
560 { 564 {
561 m_log.InfoFormat("master avatar does not exist, creating it"); 565 m_log.InfoFormat("master avatar does not exist, creating it");
562 // ...or create new user 566 // ...or create new user
@@ -569,7 +573,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
569 } 573 }
570 else 574 else
571 { 575 {
572 userID = userProfile.ID; 576 userID = userInfo.UserProfile.ID;
573 } 577 }
574 } 578 }
575 579
@@ -627,6 +631,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
627 631
628 response.Value = responseData; 632 response.Value = responseData;
629 } 633 }
634
630 m_log.Info("[RADMIN]: CreateRegion: request complete"); 635 m_log.Info("[RADMIN]: CreateRegion: request complete");
631 return response; 636 return response;
632 } 637 }
@@ -772,10 +777,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController
772 if (requestData.Contains("user_email")) 777 if (requestData.Contains("user_email"))
773 email = (string)requestData["user_email"]; 778 email = (string)requestData["user_email"];
774 779
775 UserProfileData userProfile = 780 CachedUserInfo userInfo =
776 m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); 781 m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname);
777 if (null != userProfile) 782
778 throw new Exception(String.Format("avatar {0} {1} already exists", firstname, lastname)); 783 if (null != userInfo)
784 throw new Exception(String.Format("Avatar {0} {1} already exists", firstname, lastname));
779 785
780 UUID userID = 786 UUID userID =
781 m_app.CommunicationsManager.UserAdminService.AddUser(firstname, lastname, 787 m_app.CommunicationsManager.UserAdminService.AddUser(firstname, lastname,
@@ -854,12 +860,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController
854 string firstname = (string) requestData["user_firstname"]; 860 string firstname = (string) requestData["user_firstname"];
855 string lastname = (string) requestData["user_lastname"]; 861 string lastname = (string) requestData["user_lastname"];
856 862
857 UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); 863 CachedUserInfo userInfo
864 = m_app.CommunicationsManager.UserProfileCacheService.GetUserDetails(firstname, lastname);
858 865
859 responseData["user_firstname"] = firstname; 866 responseData["user_firstname"] = firstname;
860 responseData["user_lastname"] = lastname; 867 responseData["user_lastname"] = lastname;
861 868
862 if (null == userProfile) 869 if (null == userInfo)
863 responseData["success"] = false; 870 responseData["success"] = false;
864 else 871 else
865 responseData["success"] = true; 872 responseData["success"] = true;
@@ -980,7 +987,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
980 if (requestData.ContainsKey("about_virtual_world")) 987 if (requestData.ContainsKey("about_virtual_world"))
981 aboutAvatar = (string)requestData["about_virtual_world"]; 988 aboutAvatar = (string)requestData["about_virtual_world"];
982 989
983 UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); 990 UserProfileData userProfile
991 = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname);
984 992
985 if (null == userProfile) 993 if (null == userProfile)
986 throw new Exception(String.Format("avatar {0} {1} does not exist", firstname, lastname)); 994 throw new Exception(String.Format("avatar {0} {1} does not exist", firstname, lastname));