diff options
author | Dr Scofield | 2008-10-30 15:24:52 +0000 |
---|---|---|
committer | Dr Scofield | 2008-10-30 15:24:52 +0000 |
commit | e8615f0fee05311ff85638ae449e902f1509e006 (patch) | |
tree | 65bd3e2dafe8f860465acb6d20fe57198ab44124 /OpenSim/ApplicationPlugins/RemoteController | |
parent | From: Chris Yeoh (yeohc@au1.ibm.com) (diff) | |
download | opensim-SC-e8615f0fee05311ff85638ae449e902f1509e006.zip opensim-SC-e8615f0fee05311ff85638ae449e902f1509e006.tar.gz opensim-SC-e8615f0fee05311ff85638ae449e902f1509e006.tar.bz2 opensim-SC-e8615f0fee05311ff85638ae449e902f1509e006.tar.xz |
From: Alan Webb (alan_webb@us.ibm.com)
Adding support to set start region and lookat for an avatar via
XmlRpc.
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index da940ad..0b6dd5e 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -817,15 +817,28 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
817 | string passwd = String.Empty; | 817 | string passwd = String.Empty; |
818 | uint? regX = null; | 818 | uint? regX = null; |
819 | uint? regY = null; | 819 | uint? regY = null; |
820 | uint? ulaX = null; | ||
821 | uint? ulaY = null; | ||
822 | uint? ulaZ = null; | ||
823 | uint? usaX = null; | ||
824 | uint? usaY = null; | ||
825 | uint? usaZ = null; | ||
820 | 826 | ||
821 | if (requestData.ContainsKey("user_password")) passwd = (string) requestData["user_password"]; | ||
822 | if (requestData.ContainsKey("start_region_x")) regX = Convert.ToUInt32((Int32)requestData["start_region_x"]); | ||
823 | if (requestData.ContainsKey("start_region_y")) regY = Convert.ToUInt32((Int32)requestData["start_region_y"]); | ||
824 | 827 | ||
825 | if (String.Empty == passwd && null == regX && null == regY) | 828 | if (requestData.ContainsKey("user_password")) passwd = (string) requestData["user_password"]; |
826 | throw new Exception("neither user_password nor start_region_x nor start_region_y provided"); | 829 | if (requestData.ContainsKey("start_region_x")) regX = Convert.ToUInt32((Int32)requestData["start_region_x"]); |
830 | if (requestData.ContainsKey("start_region_y")) regY = Convert.ToUInt32((Int32)requestData["start_region_y"]); | ||
831 | |||
832 | if (requestData.ContainsKey("start_lookat_x")) ulaY = Convert.ToUInt32((Int32)requestData["start_lookat_x"]); | ||
833 | if (requestData.ContainsKey("start_lookat_y")) ulaY = Convert.ToUInt32((Int32)requestData["start_lookat_y"]); | ||
834 | if (requestData.ContainsKey("start_lookat_z")) ulaY = Convert.ToUInt32((Int32)requestData["start_lookat_z"]); | ||
835 | |||
836 | if (requestData.ContainsKey("start_standat_x")) usaY = Convert.ToUInt32((Int32)requestData["start_standat_x"]); | ||
837 | if (requestData.ContainsKey("start_standat_y")) usaY = Convert.ToUInt32((Int32)requestData["start_standat_y"]); | ||
838 | if (requestData.ContainsKey("start_standat_z")) usaY = Convert.ToUInt32((Int32)requestData["start_standat_z"]); | ||
827 | 839 | ||
828 | UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); | 840 | UserProfileData userProfile = m_app.CommunicationsManager.UserService.GetUserProfile(firstname, lastname); |
841 | |||
829 | if (null == userProfile) | 842 | if (null == userProfile) |
830 | throw new Exception(String.Format("avatar {0} {1} does not exist", firstname, lastname)); | 843 | throw new Exception(String.Format("avatar {0} {1} does not exist", firstname, lastname)); |
831 | 844 | ||
@@ -835,9 +848,17 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
835 | userProfile.PasswordHash = md5PasswdHash; | 848 | userProfile.PasswordHash = md5PasswdHash; |
836 | } | 849 | } |
837 | 850 | ||
838 | if (null != regX) userProfile.HomeRegionX = (uint)regX; | 851 | if (null != regX) userProfile.HomeRegionX = (uint)regX; |
839 | if (null != regY) userProfile.HomeRegionY = (uint)regY; | 852 | if (null != regY) userProfile.HomeRegionY = (uint)regY; |
840 | 853 | ||
854 | if (null != usaX) userProfile.HomeLocationX = (uint)usaX; | ||
855 | if (null != usaY) userProfile.HomeLocationY = (uint)usaY; | ||
856 | if (null != usaZ) userProfile.HomeLocationZ = (uint)usaZ; | ||
857 | |||
858 | if (null != ulaX) userProfile.HomeLookAtX = (uint)ulaX; | ||
859 | if (null != ulaY) userProfile.HomeLookAtY = (uint)ulaY; | ||
860 | if (null != ulaZ) userProfile.HomeLookAtZ = (uint)ulaZ; | ||
861 | |||
841 | if (!m_app.CommunicationsManager.UserService.UpdateUserProfile(userProfile)) | 862 | if (!m_app.CommunicationsManager.UserService.UpdateUserProfile(userProfile)) |
842 | throw new Exception("did not manage to update user profile"); | 863 | throw new Exception("did not manage to update user profile"); |
843 | 864 | ||