diff options
author | randomhuman | 2010-08-01 13:09:33 +0100 |
---|---|---|
committer | Melanie | 2010-08-01 17:20:09 +0100 |
commit | 93532a9cd24d25fb55faf02346a6862f21c92b75 (patch) | |
tree | 1827eee094cc4d9f72819472b6ef02a0484389b1 /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |
parent | White space from previous commit. (diff) | |
download | opensim-SC-93532a9cd24d25fb55faf02346a6862f21c92b75.zip opensim-SC-93532a9cd24d25fb55faf02346a6862f21c92b75.tar.gz opensim-SC-93532a9cd24d25fb55faf02346a6862f21c92b75.tar.bz2 opensim-SC-93532a9cd24d25fb55faf02346a6862f21c92b75.tar.xz |
Changed all method names in the RemoteAdmin plugin to use the correct capitalization.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index e57aaa0..db662e1 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -196,7 +196,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
196 | Hashtable requestData = (Hashtable) request.Params[0]; | 196 | Hashtable requestData = (Hashtable) request.Params[0]; |
197 | 197 | ||
198 | m_log.Info("[RADMIN]: Request to restart Region."); | 198 | m_log.Info("[RADMIN]: Request to restart Region."); |
199 | checkStringParameters(request, new string[] {"password", "regionID"}); | 199 | CheckStringParameters(request, new string[] {"password", "regionID"}); |
200 | 200 | ||
201 | if (m_requiredPassword != String.Empty && | 201 | if (m_requiredPassword != String.Empty && |
202 | (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword)) | 202 | (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword)) |
@@ -245,7 +245,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
245 | { | 245 | { |
246 | Hashtable requestData = (Hashtable) request.Params[0]; | 246 | Hashtable requestData = (Hashtable) request.Params[0]; |
247 | 247 | ||
248 | checkStringParameters(request, new string[] {"password", "message"}); | 248 | CheckStringParameters(request, new string[] {"password", "message"}); |
249 | 249 | ||
250 | if (m_requiredPassword != String.Empty && | 250 | if (m_requiredPassword != String.Empty && |
251 | (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword)) | 251 | (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword)) |
@@ -299,7 +299,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
299 | // k, (string)requestData[k], ((string)requestData[k]).Length); | 299 | // k, (string)requestData[k], ((string)requestData[k]).Length); |
300 | // } | 300 | // } |
301 | 301 | ||
302 | checkStringParameters(request, new string[] {"password", "filename", "regionid"}); | 302 | CheckStringParameters(request, new string[] {"password", "filename", "regionid"}); |
303 | 303 | ||
304 | if (m_requiredPassword != String.Empty && | 304 | if (m_requiredPassword != String.Empty && |
305 | (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword)) | 305 | (!requestData.Contains("password") || (string) requestData["password"] != m_requiredPassword)) |
@@ -499,7 +499,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
499 | { | 499 | { |
500 | Hashtable requestData = (Hashtable) request.Params[0]; | 500 | Hashtable requestData = (Hashtable) request.Params[0]; |
501 | 501 | ||
502 | checkStringParameters(request, new string[] | 502 | CheckStringParameters(request, new string[] |
503 | { | 503 | { |
504 | "password", | 504 | "password", |
505 | "region_name", | 505 | "region_name", |
@@ -507,7 +507,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
507 | "region_master_password", | 507 | "region_master_password", |
508 | "listen_ip", "external_address" | 508 | "listen_ip", "external_address" |
509 | }); | 509 | }); |
510 | checkIntegerParams(request, new string[] {"region_x", "region_y", "listen_port"}); | 510 | CheckIntegerParams(request, new string[] {"region_x", "region_y", "listen_port"}); |
511 | 511 | ||
512 | // check password | 512 | // check password |
513 | if (!String.IsNullOrEmpty(m_requiredPassword) && | 513 | if (!String.IsNullOrEmpty(m_requiredPassword) && |
@@ -630,7 +630,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
630 | 630 | ||
631 | // If an access specification was provided, use it. | 631 | // If an access specification was provided, use it. |
632 | // Otherwise accept the default. | 632 | // Otherwise accept the default. |
633 | newscene.RegionInfo.EstateSettings.PublicAccess = getBoolean(requestData, "public", m_publicAccess); | 633 | newscene.RegionInfo.EstateSettings.PublicAccess = GetBoolean(requestData, "public", m_publicAccess); |
634 | newscene.RegionInfo.EstateSettings.EstateOwner = userID; | 634 | newscene.RegionInfo.EstateSettings.EstateOwner = userID; |
635 | if (persist) | 635 | if (persist) |
636 | newscene.RegionInfo.EstateSettings.Save(); | 636 | newscene.RegionInfo.EstateSettings.Save(); |
@@ -638,7 +638,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
638 | // enable voice on newly created region if | 638 | // enable voice on newly created region if |
639 | // requested by either the XmlRpc request or the | 639 | // requested by either the XmlRpc request or the |
640 | // configuration | 640 | // configuration |
641 | if (getBoolean(requestData, "enable_voice", m_enableVoiceForNewRegions)) | 641 | if (GetBoolean(requestData, "enable_voice", m_enableVoiceForNewRegions)) |
642 | { | 642 | { |
643 | List<ILandObject> parcels = ((Scene)newscene).LandChannel.AllParcels(); | 643 | List<ILandObject> parcels = ((Scene)newscene).LandChannel.AllParcels(); |
644 | 644 | ||
@@ -709,7 +709,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
709 | try | 709 | try |
710 | { | 710 | { |
711 | Hashtable requestData = (Hashtable) request.Params[0]; | 711 | Hashtable requestData = (Hashtable) request.Params[0]; |
712 | checkStringParameters(request, new string[] {"password", "region_name"}); | 712 | CheckStringParameters(request, new string[] {"password", "region_name"}); |
713 | 713 | ||
714 | Scene scene = null; | 714 | Scene scene = null; |
715 | string regionName = (string) requestData["region_name"]; | 715 | string regionName = (string) requestData["region_name"]; |
@@ -779,7 +779,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
779 | try | 779 | try |
780 | { | 780 | { |
781 | Hashtable requestData = (Hashtable) request.Params[0]; | 781 | Hashtable requestData = (Hashtable) request.Params[0]; |
782 | checkStringParameters(request, new string[] {"password"}); | 782 | CheckStringParameters(request, new string[] {"password"}); |
783 | 783 | ||
784 | if (requestData.ContainsKey("region_id") && | 784 | if (requestData.ContainsKey("region_id") && |
785 | !String.IsNullOrEmpty((string) requestData["region_id"])) | 785 | !String.IsNullOrEmpty((string) requestData["region_id"])) |
@@ -874,7 +874,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
874 | try | 874 | try |
875 | { | 875 | { |
876 | Hashtable requestData = (Hashtable) request.Params[0]; | 876 | Hashtable requestData = (Hashtable) request.Params[0]; |
877 | checkStringParameters(request, new string[] {"password", "region_name"}); | 877 | CheckStringParameters(request, new string[] {"password", "region_name"}); |
878 | 878 | ||
879 | Scene scene = null; | 879 | Scene scene = null; |
880 | string regionName = (string) requestData["region_name"]; | 880 | string regionName = (string) requestData["region_name"]; |
@@ -883,13 +883,13 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
883 | 883 | ||
884 | // Modify access | 884 | // Modify access |
885 | scene.RegionInfo.EstateSettings.PublicAccess = | 885 | scene.RegionInfo.EstateSettings.PublicAccess = |
886 | getBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess); | 886 | GetBoolean(requestData,"public", scene.RegionInfo.EstateSettings.PublicAccess); |
887 | if (scene.RegionInfo.Persistent) | 887 | if (scene.RegionInfo.Persistent) |
888 | scene.RegionInfo.EstateSettings.Save(); | 888 | scene.RegionInfo.EstateSettings.Save(); |
889 | 889 | ||
890 | if (requestData.ContainsKey("enable_voice")) | 890 | if (requestData.ContainsKey("enable_voice")) |
891 | { | 891 | { |
892 | bool enableVoice = getBoolean(requestData, "enable_voice", true); | 892 | bool enableVoice = GetBoolean(requestData, "enable_voice", true); |
893 | List<ILandObject> parcels = ((Scene)scene).LandChannel.AllParcels(); | 893 | List<ILandObject> parcels = ((Scene)scene).LandChannel.AllParcels(); |
894 | 894 | ||
895 | foreach (ILandObject parcel in parcels) | 895 | foreach (ILandObject parcel in parcels) |
@@ -983,12 +983,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
983 | Hashtable requestData = (Hashtable) request.Params[0]; | 983 | Hashtable requestData = (Hashtable) request.Params[0]; |
984 | 984 | ||
985 | // check completeness | 985 | // check completeness |
986 | checkStringParameters(request, new string[] | 986 | CheckStringParameters(request, new string[] |
987 | { | 987 | { |
988 | "password", "user_firstname", | 988 | "password", "user_firstname", |
989 | "user_lastname", "user_password", | 989 | "user_lastname", "user_password", |
990 | }); | 990 | }); |
991 | checkIntegerParams(request, new string[] {"start_region_x", "start_region_y"}); | 991 | CheckIntegerParams(request, new string[] {"start_region_x", "start_region_y"}); |
992 | 992 | ||
993 | // check password | 993 | // check password |
994 | if (!String.IsNullOrEmpty(m_requiredPassword) && | 994 | if (!String.IsNullOrEmpty(m_requiredPassword) && |
@@ -1028,7 +1028,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1028 | 1028 | ||
1029 | // Establish the avatar's initial appearance | 1029 | // Establish the avatar's initial appearance |
1030 | 1030 | ||
1031 | updateUserAppearance(responseData, requestData, account.PrincipalID); | 1031 | UpdateUserAppearance(responseData, requestData, account.PrincipalID); |
1032 | 1032 | ||
1033 | responseData["success"] = true; | 1033 | responseData["success"] = true; |
1034 | responseData["avatar_uuid"] = account.PrincipalID.ToString(); | 1034 | responseData["avatar_uuid"] = account.PrincipalID.ToString(); |
@@ -1099,7 +1099,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1099 | Hashtable requestData = (Hashtable) request.Params[0]; | 1099 | Hashtable requestData = (Hashtable) request.Params[0]; |
1100 | 1100 | ||
1101 | // check completeness | 1101 | // check completeness |
1102 | checkStringParameters(request, new string[] {"password", "user_firstname", "user_lastname"}); | 1102 | CheckStringParameters(request, new string[] {"password", "user_firstname", "user_lastname"}); |
1103 | 1103 | ||
1104 | string firstname = (string) requestData["user_firstname"]; | 1104 | string firstname = (string) requestData["user_firstname"]; |
1105 | string lastname = (string) requestData["user_lastname"]; | 1105 | string lastname = (string) requestData["user_lastname"]; |
@@ -1204,7 +1204,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1204 | Hashtable requestData = (Hashtable) request.Params[0]; | 1204 | Hashtable requestData = (Hashtable) request.Params[0]; |
1205 | 1205 | ||
1206 | // check completeness | 1206 | // check completeness |
1207 | checkStringParameters(request, new string[] { | 1207 | CheckStringParameters(request, new string[] { |
1208 | "password", "user_firstname", | 1208 | "password", "user_firstname", |
1209 | "user_lastname"}); | 1209 | "user_lastname"}); |
1210 | 1210 | ||
@@ -1292,7 +1292,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1292 | 1292 | ||
1293 | // User has been created. Now establish gender and appearance. | 1293 | // User has been created. Now establish gender and appearance. |
1294 | 1294 | ||
1295 | updateUserAppearance(responseData, requestData, account.PrincipalID); | 1295 | UpdateUserAppearance(responseData, requestData, account.PrincipalID); |
1296 | 1296 | ||
1297 | responseData["success"] = true; | 1297 | responseData["success"] = true; |
1298 | responseData["avatar_uuid"] = account.PrincipalID.ToString(); | 1298 | responseData["avatar_uuid"] = account.PrincipalID.ToString(); |
@@ -1328,7 +1328,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1328 | /// This should probably get moved into somewhere more core eventually. | 1328 | /// This should probably get moved into somewhere more core eventually. |
1329 | /// </summary> | 1329 | /// </summary> |
1330 | 1330 | ||
1331 | private void updateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid) | 1331 | private void UpdateUserAppearance(Hashtable responseData, Hashtable requestData, UUID userid) |
1332 | { | 1332 | { |
1333 | m_log.DebugFormat("[RADMIN] updateUserAppearance"); | 1333 | m_log.DebugFormat("[RADMIN] updateUserAppearance"); |
1334 | 1334 | ||
@@ -1398,7 +1398,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1398 | // actual asset ids, however to complete the magic we need to populate the inventory with the | 1398 | // actual asset ids, however to complete the magic we need to populate the inventory with the |
1399 | // assets in question. | 1399 | // assets in question. |
1400 | 1400 | ||
1401 | establishAppearance(userid, mprof.PrincipalID); | 1401 | EstablishAppearance(userid, mprof.PrincipalID); |
1402 | 1402 | ||
1403 | m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}", | 1403 | m_log.DebugFormat("[RADMIN] Finished setting appearance for avatar {0}, using model {1}", |
1404 | userid, model); | 1404 | userid, model); |
@@ -1410,7 +1410,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1410 | /// is known to exist, as is the target avatar. | 1410 | /// is known to exist, as is the target avatar. |
1411 | /// </summary> | 1411 | /// </summary> |
1412 | 1412 | ||
1413 | private void establishAppearance(UUID dest, UUID srca) | 1413 | private void EstablishAppearance(UUID dest, UUID srca) |
1414 | { | 1414 | { |
1415 | m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", dest, srca); | 1415 | m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", dest, srca); |
1416 | Scene scene = m_app.SceneManager.CurrentOrFirstScene; | 1416 | Scene scene = m_app.SceneManager.CurrentOrFirstScene; |
@@ -1431,7 +1431,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1431 | // Simple copy of wearables and appearance update | 1431 | // Simple copy of wearables and appearance update |
1432 | try | 1432 | try |
1433 | { | 1433 | { |
1434 | copyWearablesAndAttachments(dest, srca, ava); | 1434 | CopyWearablesAndAttachments(dest, srca, ava); |
1435 | 1435 | ||
1436 | AvatarData adata = new AvatarData(ava); | 1436 | AvatarData adata = new AvatarData(ava); |
1437 | scene.AvatarService.SetAvatar(dest, adata); | 1437 | scene.AvatarService.SetAvatar(dest, adata); |
@@ -1449,8 +1449,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1449 | try | 1449 | try |
1450 | { | 1450 | { |
1451 | Dictionary<UUID,UUID> imap = new Dictionary<UUID,UUID>(); | 1451 | Dictionary<UUID,UUID> imap = new Dictionary<UUID,UUID>(); |
1452 | copyInventoryFolders(dest, srca, AssetType.Clothing, imap, ava); | 1452 | CopyInventoryFolders(dest, srca, AssetType.Clothing, imap, ava); |
1453 | copyInventoryFolders(dest, srca, AssetType.Bodypart, imap, ava); | 1453 | CopyInventoryFolders(dest, srca, AssetType.Bodypart, imap, ava); |
1454 | 1454 | ||
1455 | AvatarWearable[] wearables = ava.Wearables; | 1455 | AvatarWearable[] wearables = ava.Wearables; |
1456 | 1456 | ||
@@ -1483,7 +1483,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1483 | /// In parallel the avatar wearables and attachments are updated. | 1483 | /// In parallel the avatar wearables and attachments are updated. |
1484 | /// </summary> | 1484 | /// </summary> |
1485 | 1485 | ||
1486 | private void copyWearablesAndAttachments(UUID dest, UUID srca, AvatarAppearance ava) | 1486 | private void CopyWearablesAndAttachments(UUID dest, UUID srca, AvatarAppearance ava) |
1487 | { | 1487 | { |
1488 | IInventoryService iserv = m_app.SceneManager.CurrentOrFirstScene.InventoryService; | 1488 | IInventoryService iserv = m_app.SceneManager.CurrentOrFirstScene.InventoryService; |
1489 | 1489 | ||
@@ -1618,7 +1618,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1618 | /// copies of Clothing and Bodyparts inventory folders and attaches worn attachments | 1618 | /// copies of Clothing and Bodyparts inventory folders and attaches worn attachments |
1619 | /// </summary> | 1619 | /// </summary> |
1620 | 1620 | ||
1621 | private void copyInventoryFolders(UUID dest, UUID srca, AssetType assettype, Dictionary<UUID,UUID> imap, | 1621 | private void CopyInventoryFolders(UUID dest, UUID srca, AssetType assettype, Dictionary<UUID,UUID> imap, |
1622 | AvatarAppearance ava) | 1622 | AvatarAppearance ava) |
1623 | { | 1623 | { |
1624 | IInventoryService iserv = m_app.SceneManager.CurrentOrFirstScene.InventoryService; | 1624 | IInventoryService iserv = m_app.SceneManager.CurrentOrFirstScene.InventoryService; |
@@ -1728,7 +1728,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1728 | /// other outfits are provided to allow "real" avatars a way to easily change their outfits. | 1728 | /// other outfits are provided to allow "real" avatars a way to easily change their outfits. |
1729 | /// </summary> | 1729 | /// </summary> |
1730 | 1730 | ||
1731 | private bool createDefaultAvatars() | 1731 | private bool CreateDefaultAvatars() |
1732 | { | 1732 | { |
1733 | // Only load once | 1733 | // Only load once |
1734 | 1734 | ||
@@ -2827,7 +2827,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2827 | return response; | 2827 | return response; |
2828 | } | 2828 | } |
2829 | 2829 | ||
2830 | private static void checkStringParameters(XmlRpcRequest request, string[] param) | 2830 | private static void CheckStringParameters(XmlRpcRequest request, string[] param) |
2831 | { | 2831 | { |
2832 | Hashtable requestData = (Hashtable) request.Params[0]; | 2832 | Hashtable requestData = (Hashtable) request.Params[0]; |
2833 | foreach (string p in param) | 2833 | foreach (string p in param) |
@@ -2839,7 +2839,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2839 | } | 2839 | } |
2840 | } | 2840 | } |
2841 | 2841 | ||
2842 | private static void checkIntegerParams(XmlRpcRequest request, string[] param) | 2842 | private static void CheckIntegerParams(XmlRpcRequest request, string[] param) |
2843 | { | 2843 | { |
2844 | Hashtable requestData = (Hashtable) request.Params[0]; | 2844 | Hashtable requestData = (Hashtable) request.Params[0]; |
2845 | foreach (string p in param) | 2845 | foreach (string p in param) |
@@ -2849,7 +2849,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2849 | } | 2849 | } |
2850 | } | 2850 | } |
2851 | 2851 | ||
2852 | private bool getBoolean(Hashtable requestData, string tag, bool defv) | 2852 | private bool GetBoolean(Hashtable requestData, string tag, bool defv) |
2853 | { | 2853 | { |
2854 | // If an access value has been provided, apply it. | 2854 | // If an access value has been provided, apply it. |
2855 | if (requestData.Contains(tag)) | 2855 | if (requestData.Contains(tag)) |