diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs index 590753e..bc05b0f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs | |||
@@ -288,8 +288,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
288 | 288 | ||
289 | if(SimianAddGeneric(GroupID, "Group", name, GroupInfoMap)) | 289 | if(SimianAddGeneric(GroupID, "Group", name, GroupInfoMap)) |
290 | { | 290 | { |
291 | AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); | 291 | AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); |
292 | AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); | 292 | AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); |
293 | 293 | ||
294 | AddAgentToGroup(requestingAgentID, requestingAgentID, GroupID, OwnerRoleID); | 294 | AddAgentToGroup(requestingAgentID, requestingAgentID, GroupID, OwnerRoleID); |
295 | 295 | ||
@@ -413,7 +413,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
413 | } | 413 | } |
414 | } | 414 | } |
415 | else if ((groupName != null) && (groupName != string.Empty)) | 415 | else if ((groupName != null) && (groupName != string.Empty)) |
416 | { | 416 | { |
417 | if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap)) | 417 | if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap)) |
418 | { | 418 | { |
419 | return null; | 419 | return null; |
@@ -422,7 +422,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
422 | 422 | ||
423 | GroupRecord GroupInfo = new GroupRecord(); | 423 | GroupRecord GroupInfo = new GroupRecord(); |
424 | 424 | ||
425 | GroupInfo.GroupID = groupID; | 425 | GroupInfo.GroupID = groupID; |
426 | GroupInfo.GroupName = groupName; | 426 | GroupInfo.GroupName = groupName; |
427 | GroupInfo.Charter = GroupInfoMap["Charter"].AsString(); | 427 | GroupInfo.Charter = GroupInfoMap["Charter"].AsString(); |
428 | GroupInfo.ShowInList = GroupInfoMap["ShowInList"].AsBoolean(); | 428 | GroupInfo.ShowInList = GroupInfoMap["ShowInList"].AsBoolean(); |
@@ -751,9 +751,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
751 | if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup)) | 751 | if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup)) |
752 | { | 752 | { |
753 | GroupID = UserActiveGroup["GroupID"].AsUUID(); | 753 | GroupID = UserActiveGroup["GroupID"].AsUUID(); |
754 | } | 754 | } |
755 | 755 | ||
756 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Active GroupID : {0}", GroupID.ToString()); | 756 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Active GroupID : {0}", GroupID.ToString()); |
757 | return GetAgentGroupMembership(requestingAgentID, agentID, GroupID); | 757 | return GetAgentGroupMembership(requestingAgentID, agentID, GroupID); |
758 | } | 758 | } |
759 | 759 | ||
@@ -781,24 +781,24 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
781 | 781 | ||
782 | List<GroupRolesData> Roles = new List<GroupRolesData>(); | 782 | List<GroupRolesData> Roles = new List<GroupRolesData>(); |
783 | 783 | ||
784 | Dictionary<string, OSDMap> GroupRoles; | 784 | Dictionary<string, OSDMap> GroupRoles; |
785 | if (SimianGetGenericEntries(groupID, "GroupRole", out GroupRoles)) | 785 | if (SimianGetGenericEntries(groupID, "GroupRole", out GroupRoles)) |
786 | { | 786 | { |
787 | Dictionary<string, OSDMap> MemberRoles; | 787 | Dictionary<string, OSDMap> MemberRoles; |
788 | if (SimianGetGenericEntries(agentID, "GroupRole" + groupID.ToString(), out MemberRoles)) | 788 | if (SimianGetGenericEntries(agentID, "GroupRole" + groupID.ToString(), out MemberRoles)) |
789 | { | 789 | { |
790 | foreach (KeyValuePair<string, OSDMap> kvp in MemberRoles) | 790 | foreach (KeyValuePair<string, OSDMap> kvp in MemberRoles) |
791 | { | 791 | { |
792 | GroupRolesData data = new GroupRolesData(); | 792 | GroupRolesData data = new GroupRolesData(); |
793 | data.RoleID = UUID.Parse(kvp.Key); | 793 | data.RoleID = UUID.Parse(kvp.Key); |
794 | data.Name = GroupRoles[kvp.Key]["Name"].AsString(); | 794 | data.Name = GroupRoles[kvp.Key]["Name"].AsString(); |
795 | data.Description = GroupRoles[kvp.Key]["Description"].AsString(); | 795 | data.Description = GroupRoles[kvp.Key]["Description"].AsString(); |
796 | data.Title = GroupRoles[kvp.Key]["Title"].AsString(); | 796 | data.Title = GroupRoles[kvp.Key]["Title"].AsString(); |
797 | data.Powers = GroupRoles[kvp.Key]["Powers"].AsULong(); | 797 | data.Powers = GroupRoles[kvp.Key]["Powers"].AsULong(); |
798 | 798 | ||
799 | Roles.Add(data); | 799 | Roles.Add(data); |
800 | } | 800 | } |
801 | } | 801 | } |
802 | } | 802 | } |
803 | return Roles; | 803 | return Roles; |
804 | } | 804 | } |
@@ -912,8 +912,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
912 | { | 912 | { |
913 | foreach( KeyValuePair<UUID, OSDMap> GroupRoleMember in GroupRoleMembers ) | 913 | foreach( KeyValuePair<UUID, OSDMap> GroupRoleMember in GroupRoleMembers ) |
914 | { | 914 | { |
915 | GroupRoleMembersData data = new GroupRoleMembersData(); | 915 | GroupRoleMembersData data = new GroupRoleMembersData(); |
916 | 916 | ||
917 | data.MemberID = GroupRoleMember.Key; | 917 | data.MemberID = GroupRoleMember.Key; |
918 | data.RoleID = UUID.Parse(Role.Key); | 918 | data.RoleID = UUID.Parse(Role.Key); |
919 | 919 | ||
@@ -1066,20 +1066,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1066 | OSDMap Response = WebUtil.PostToService(m_serviceURL, RequestArgs); | 1066 | OSDMap Response = WebUtil.PostToService(m_serviceURL, RequestArgs); |
1067 | if (Response["Success"].AsBoolean() && Response["Entries"] is OSDArray) | 1067 | if (Response["Success"].AsBoolean() && Response["Entries"] is OSDArray) |
1068 | { | 1068 | { |
1069 | OSDArray entryArray = (OSDArray)Response["Entries"]; | 1069 | OSDArray entryArray = (OSDArray)Response["Entries"]; |
1070 | if (entryArray.Count >= 1) | 1070 | if (entryArray.Count >= 1) |
1071 | { | 1071 | { |
1072 | OSDMap entryMap = entryArray[0] as OSDMap; | 1072 | OSDMap entryMap = entryArray[0] as OSDMap; |
1073 | key = entryMap["Key"].AsString(); | 1073 | key = entryMap["Key"].AsString(); |
1074 | map = (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()); | 1074 | map = (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()); |
1075 | 1075 | ||
1076 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); | 1076 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); |
1077 | 1077 | ||
1078 | return true; | 1078 | return true; |
1079 | } | 1079 | } |
1080 | else | 1080 | else |
1081 | { | 1081 | { |
1082 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); | 1082 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); |
1083 | } | 1083 | } |
1084 | } | 1084 | } |
1085 | else | 1085 | else |
@@ -1106,20 +1106,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1106 | OSDMap Response = WebUtil.PostToService(m_serviceURL, RequestArgs); | 1106 | OSDMap Response = WebUtil.PostToService(m_serviceURL, RequestArgs); |
1107 | if (Response["Success"].AsBoolean() && Response["Entries"] is OSDArray) | 1107 | if (Response["Success"].AsBoolean() && Response["Entries"] is OSDArray) |
1108 | { | 1108 | { |
1109 | OSDArray entryArray = (OSDArray)Response["Entries"]; | 1109 | OSDArray entryArray = (OSDArray)Response["Entries"]; |
1110 | if (entryArray.Count >= 1) | 1110 | if (entryArray.Count >= 1) |
1111 | { | 1111 | { |
1112 | OSDMap entryMap = entryArray[0] as OSDMap; | 1112 | OSDMap entryMap = entryArray[0] as OSDMap; |
1113 | ownerID = entryMap["OwnerID"].AsUUID(); | 1113 | ownerID = entryMap["OwnerID"].AsUUID(); |
1114 | map = (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()); | 1114 | map = (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()); |
1115 | 1115 | ||
1116 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); | 1116 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); |
1117 | 1117 | ||
1118 | return true; | 1118 | return true; |
1119 | } | 1119 | } |
1120 | else | 1120 | else |
1121 | { | 1121 | { |
1122 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); | 1122 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); |
1123 | } | 1123 | } |
1124 | } | 1124 | } |
1125 | else | 1125 | else |
@@ -1152,16 +1152,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1152 | { | 1152 | { |
1153 | OSDMap entryMap = entryArray[0] as OSDMap; | 1153 | OSDMap entryMap = entryArray[0] as OSDMap; |
1154 | key = entryMap["Key"].AsString(); | 1154 | key = entryMap["Key"].AsString(); |
1155 | map = (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()); | 1155 | map = (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString()); |
1156 | 1156 | ||
1157 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); | 1157 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); |
1158 | 1158 | ||
1159 | return true; | 1159 | return true; |
1160 | } | 1160 | } |
1161 | else | 1161 | else |
1162 | { | 1162 | { |
1163 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); | 1163 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); |
1164 | } | 1164 | } |
1165 | } | 1165 | } |
1166 | else | 1166 | else |
1167 | { | 1167 | { |
@@ -1191,13 +1191,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1191 | 1191 | ||
1192 | OSDArray entryArray = (OSDArray)response["Entries"]; | 1192 | OSDArray entryArray = (OSDArray)response["Entries"]; |
1193 | foreach (OSDMap entryMap in entryArray) | 1193 | foreach (OSDMap entryMap in entryArray) |
1194 | { | 1194 | { |
1195 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); | 1195 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); |
1196 | maps.Add(entryMap["Key"].AsString(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString())); | 1196 | maps.Add(entryMap["Key"].AsString(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString())); |
1197 | } | 1197 | } |
1198 | if(maps.Count == 0) | 1198 | if(maps.Count == 0) |
1199 | { | 1199 | { |
1200 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); | 1200 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); |
1201 | } | 1201 | } |
1202 | 1202 | ||
1203 | return true; | 1203 | return true; |
@@ -1229,14 +1229,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
1229 | 1229 | ||
1230 | OSDArray entryArray = (OSDArray)response["Entries"]; | 1230 | OSDArray entryArray = (OSDArray)response["Entries"]; |
1231 | foreach (OSDMap entryMap in entryArray) | 1231 | foreach (OSDMap entryMap in entryArray) |
1232 | { | 1232 | { |
1233 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); | 1233 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Generics Result {0}", entryMap["Value"].AsString()); |
1234 | maps.Add(entryMap["OwnerID"].AsUUID(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString())); | 1234 | maps.Add(entryMap["OwnerID"].AsUUID(), (OSDMap)OSDParser.DeserializeJson(entryMap["Value"].AsString())); |
1235 | } | 1235 | } |
1236 | if (maps.Count == 0) | 1236 | if (maps.Count == 0) |
1237 | { | 1237 | { |
1238 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); | 1238 | if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] No Generics Results"); |
1239 | } | 1239 | } |
1240 | return true; | 1240 | return true; |
1241 | } | 1241 | } |
1242 | else | 1242 | else |