aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups
diff options
context:
space:
mode:
authorJeff Ames2010-09-12 13:43:49 -0400
committerJeff Ames2010-09-12 13:43:49 -0400
commitf1f0bc23f4501ba99035283d3407ddad2b21b785 (patch)
tree2b62a244eddf18f5608405abcefa9f763ab54340 /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups
parentAdd copyright headers. (diff)
downloadopensim-SC_OLD-f1f0bc23f4501ba99035283d3407ddad2b21b785.zip
opensim-SC_OLD-f1f0bc23f4501ba99035283d3407ddad2b21b785.tar.gz
opensim-SC_OLD-f1f0bc23f4501ba99035283d3407ddad2b21b785.tar.bz2
opensim-SC_OLD-f1f0bc23f4501ba99035283d3407ddad2b21b785.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs39
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs4
3 files changed, 21 insertions, 24 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
index 2969503..6f044e0 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs
@@ -962,7 +962,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
962 if ((groupInfo == null) || (account == null)) 962 if ((groupInfo == null) || (account == null))
963 { 963 {
964 return; 964 return;
965 } 965 }
966 966
967 // Send Message to Ejectee 967 // Send Message to Ejectee
968 GridInstantMessage msg = new GridInstantMessage(); 968 GridInstantMessage msg = new GridInstantMessage();
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
index 9363205..0d265f2 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs
@@ -91,11 +91,11 @@ using OpenSim.Services.Interfaces;
91 * + RoleID 91 * + RoleID
92 * 92 *
93 * GroupID -> GroupNotice -> NoticeID 93 * GroupID -> GroupNotice -> NoticeID
94 * + TimeStamp [uint] 94 * + TimeStamp [uint]
95 * + FromName [string] 95 * + FromName [string]
96 * + Subject [string] 96 * + Subject [string]
97 * + Message [string] 97 * + Message [string]
98 * + BinaryBucket [byte[]] 98 * + BinaryBucket [byte[]]
99 * 99 *
100 * */ 100 * */
101 101
@@ -309,7 +309,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
309 GroupInfoMap["OwnerRoleID"] = OSD.FromUUID(OwnerRoleID); 309 GroupInfoMap["OwnerRoleID"] = OSD.FromUUID(OwnerRoleID);
310 GroupInfoMap["OwnersPowers"] = OSD.FromULong((ulong)m_DefaultOwnerPowers); 310 GroupInfoMap["OwnersPowers"] = OSD.FromULong((ulong)m_DefaultOwnerPowers);
311 311
312 if(SimianAddGeneric(GroupID, "Group", name, GroupInfoMap)) 312 if (SimianAddGeneric(GroupID, "Group", name, GroupInfoMap))
313 { 313 {
314 AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); 314 AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers);
315 AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); 315 AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers);
@@ -334,7 +334,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
334 334
335 string GroupName; 335 string GroupName;
336 OSDMap GroupInfoMap; 336 OSDMap GroupInfoMap;
337 if( SimianGetFirstGenericEntry(groupID, "GroupInfo", out GroupName, out GroupInfoMap) ) 337 if (SimianGetFirstGenericEntry(groupID, "GroupInfo", out GroupName, out GroupInfoMap))
338 { 338 {
339 GroupInfoMap["Charter"] = OSD.FromString(charter); 339 GroupInfoMap["Charter"] = OSD.FromString(charter);
340 GroupInfoMap["ShowInList"] = OSD.FromBoolean(showInList); 340 GroupInfoMap["ShowInList"] = OSD.FromBoolean(showInList);
@@ -379,7 +379,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
379 string GroupRoleMemberType = "GroupRole" + groupID.ToString(); 379 string GroupRoleMemberType = "GroupRole" + groupID.ToString();
380 if (SimianGetGenericEntries(GroupRoleMemberType, roleID.ToString(), out GroupRoleMembers)) 380 if (SimianGetGenericEntries(GroupRoleMemberType, roleID.ToString(), out GroupRoleMembers))
381 { 381 {
382 foreach(UUID UserID in GroupRoleMembers.Keys) 382 foreach (UUID UserID in GroupRoleMembers.Keys)
383 { 383 {
384 EnsureRoleNotSelectedByMember(groupID, roleID, UserID); 384 EnsureRoleNotSelectedByMember(groupID, roleID, UserID);
385 385
@@ -724,7 +724,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
724 } 724 }
725 725
726 OSDMap UserGroupMemberInfo; 726 OSDMap UserGroupMemberInfo;
727 if( SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo) ) 727 if (SimianGetGenericEntry(agentID, "GroupMember", groupID.ToString(), out UserGroupMemberInfo))
728 { 728 {
729 data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean(); 729 data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean();
730 data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger(); 730 data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger();
@@ -736,7 +736,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
736 // 736 //
737 737
738 OSDMap GroupRoleInfo; 738 OSDMap GroupRoleInfo;
739 if( SimianGetGenericEntry(groupID, "GroupRole", data.ActiveRole.ToString(), out GroupRoleInfo) ) 739 if (SimianGetGenericEntry(groupID, "GroupRole", data.ActiveRole.ToString(), out GroupRoleInfo))
740 { 740 {
741 data.GroupTitle = GroupRoleInfo["Title"].AsString(); 741 data.GroupTitle = GroupRoleInfo["Title"].AsString();
742 data.GroupPowers = GroupRoleInfo["Powers"].AsULong(); 742 data.GroupPowers = GroupRoleInfo["Powers"].AsULong();
@@ -748,7 +748,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
748 // 748 //
749 OSDMap GroupInfo; 749 OSDMap GroupInfo;
750 string GroupName; 750 string GroupName;
751 if( SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo) ) 751 if (SimianGetFirstGenericEntry(groupID, "Group", out GroupName, out GroupInfo))
752 { 752 {
753 data.GroupID = groupID; 753 data.GroupID = groupID;
754 data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean(); 754 data.AllowPublish = GroupInfo["AllowPublish"].AsBoolean();
@@ -928,12 +928,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
928 Dictionary<string, OSDMap> GroupRoles; 928 Dictionary<string, OSDMap> GroupRoles;
929 if (SimianGetGenericEntries(groupID, "GroupRole", out GroupRoles)) 929 if (SimianGetGenericEntries(groupID, "GroupRole", out GroupRoles))
930 { 930 {
931 foreach( KeyValuePair<string, OSDMap> Role in GroupRoles ) 931 foreach (KeyValuePair<string, OSDMap> Role in GroupRoles)
932 { 932 {
933 Dictionary<UUID, OSDMap> GroupRoleMembers; 933 Dictionary<UUID, OSDMap> GroupRoleMembers;
934 if( SimianGetGenericEntries("GroupRole"+groupID.ToString(), Role.Key, out GroupRoleMembers) ) 934 if (SimianGetGenericEntries("GroupRole"+groupID.ToString(), Role.Key, out GroupRoleMembers))
935 { 935 {
936 foreach( KeyValuePair<UUID, OSDMap> GroupRoleMember in GroupRoleMembers ) 936 foreach (KeyValuePair<UUID, OSDMap> GroupRoleMember in GroupRoleMembers)
937 { 937 {
938 GroupRoleMembersData data = new GroupRoleMembersData(); 938 GroupRoleMembersData data = new GroupRoleMembersData();
939 939
@@ -1264,7 +1264,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1264 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); 1264 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString());
1265 maps.Add(entryMap["Key"].AsString(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString())); 1265 maps.Add(entryMap["Key"].AsString(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()));
1266 } 1266 }
1267 if(maps.Count == 0) 1267 if (maps.Count == 0)
1268 { 1268 {
1269 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); 1269 if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results");
1270 } 1270 }
@@ -1352,17 +1352,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1352 } 1352 }
1353 1353
1354 // Check if this is an update or a request 1354 // Check if this is an update or a request
1355 if ( requestArgs["RequestMethod"] == "RemoveGeneric" 1355 if (requestArgs["RequestMethod"] == "RemoveGeneric"
1356 || requestArgs["RequestMethod"] == "AddGeneric" 1356 || requestArgs["RequestMethod"] == "AddGeneric")
1357 )
1358
1359 { 1357 {
1360 // Any and all updates cause the cache to clear 1358 // Any and all updates cause the cache to clear
1361 m_memoryCache.Clear(); 1359 m_memoryCache.Clear();
1362 1360
1363 // Send update to server, return the response without caching it 1361 // Send update to server, return the response without caching it
1364 return WebUtil.PostToService(m_groupsServerURI, requestArgs); 1362 return WebUtil.PostToService(m_groupsServerURI, requestArgs);
1365
1366 } 1363 }
1367 1364
1368 // If we're not doing an update, we must be requesting data 1365 // If we're not doing an update, we must be requesting data
@@ -1372,7 +1369,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1372 OSDMap response = null; 1369 OSDMap response = null;
1373 if (!m_memoryCache.TryGetValue(CacheKey, out response)) 1370 if (!m_memoryCache.TryGetValue(CacheKey, out response))
1374 { 1371 {
1375 // if it wasn't in the cache, pass the request to the Simian Grid Services 1372 // if it wasn't in the cache, pass the request to the Simian Grid Services
1376 response = WebUtil.PostToService(m_groupsServerURI, requestArgs); 1373 response = WebUtil.PostToService(m_groupsServerURI, requestArgs);
1377 1374
1378 // and cache the response 1375 // and cache the response
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
index 79b9a16..a88c5e2 100644
--- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs
@@ -960,7 +960,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
960 960
961 } 961 }
962 962
963 if( resp == null ) 963 if (resp == null)
964 { 964 {
965 string UserService; 965 string UserService;
966 UUID SessionID; 966 UUID SessionID;
@@ -1065,7 +1065,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups
1065 1065
1066 /// <summary> 1066 /// <summary>
1067 /// Group Request Tokens are an attempt to allow the groups service to authenticate 1067 /// Group Request Tokens are an attempt to allow the groups service to authenticate
1068 /// requests. 1068 /// requests.
1069 /// TODO: This broke after the big grid refactor, either find a better way, or discard this 1069 /// TODO: This broke after the big grid refactor, either find a better way, or discard this
1070 /// </summary> 1070 /// </summary>
1071 /// <param name="client"></param> 1071 /// <param name="client"></param>