diff options
author | Dr Scofield | 2009-04-22 18:00:59 +0000 |
---|---|---|
committer | Dr Scofield | 2009-04-22 18:00:59 +0000 |
commit | d455d579d03523b98e9f0161716942889b7913c3 (patch) | |
tree | b504715c1529f2994fc60930f4478b3aed1ae40c /OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs | |
parent | Thanks tlaukkan for a patch that Fixes asset cache url forming for MXP join r... (diff) | |
download | opensim-SC_OLD-d455d579d03523b98e9f0161716942889b7913c3.zip opensim-SC_OLD-d455d579d03523b98e9f0161716942889b7913c3.tar.gz opensim-SC_OLD-d455d579d03523b98e9f0161716942889b7913c3.tar.bz2 opensim-SC_OLD-d455d579d03523b98e9f0161716942889b7913c3.tar.xz |
more cleanup
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs | 61 |
1 files changed, 32 insertions, 29 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs index ada6cfd..30839cc 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupData.cs | |||
@@ -52,7 +52,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
52 | 52 | ||
53 | private string m_serviceURL = string.Empty; | 53 | private string m_serviceURL = string.Empty; |
54 | 54 | ||
55 | public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | GroupPowers.Accountable | GroupPowers.JoinChat | GroupPowers.AllowVoiceChat | GroupPowers.ReceiveNotices | GroupPowers.StartProposal | GroupPowers.VoteOnProposal; | 55 | public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | |
56 | GroupPowers.Accountable | | ||
57 | GroupPowers.JoinChat | | ||
58 | GroupPowers.AllowVoiceChat | | ||
59 | GroupPowers.ReceiveNotices | | ||
60 | GroupPowers.StartProposal | | ||
61 | GroupPowers.VoteOnProposal; | ||
56 | 62 | ||
57 | private bool m_disableKeepAlive = false; | 63 | private bool m_disableKeepAlive = false; |
58 | 64 | ||
@@ -73,7 +79,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
73 | /// <summary> | 79 | /// <summary> |
74 | /// Create a Group, including Everyone and Owners Role, place FounderID in both groups, select Owner as selected role, and newly created group as agent's active role. | 80 | /// Create a Group, including Everyone and Owners Role, place FounderID in both groups, select Owner as selected role, and newly created group as agent's active role. |
75 | /// </summary> | 81 | /// </summary> |
76 | public UUID CreateGroup(string name, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID) | 82 | public UUID CreateGroup(string name, string charter, bool showInList, UUID insigniaID, |
83 | int membershipFee, bool openEnrollment, bool allowPublish, | ||
84 | bool maturePublish, UUID founderID) | ||
77 | { | 85 | { |
78 | UUID GroupID = UUID.Random(); | 86 | UUID GroupID = UUID.Random(); |
79 | UUID OwnerRoleID = UUID.Random(); | 87 | UUID OwnerRoleID = UUID.Random(); |
@@ -140,9 +148,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
140 | | GroupPowers.VoteOnProposal; | 148 | | GroupPowers.VoteOnProposal; |
141 | param["OwnersPowers"] = ((ulong)OwnerPowers).ToString(); | 149 | param["OwnersPowers"] = ((ulong)OwnerPowers).ToString(); |
142 | 150 | ||
143 | |||
144 | |||
145 | |||
146 | Hashtable respData = XmlRpcCall("groups.createGroup", param); | 151 | Hashtable respData = XmlRpcCall("groups.createGroup", param); |
147 | 152 | ||
148 | if (respData.Contains("error")) | 153 | if (respData.Contains("error")) |
@@ -155,7 +160,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
155 | return UUID.Parse((string)respData["GroupID"]); | 160 | return UUID.Parse((string)respData["GroupID"]); |
156 | } | 161 | } |
157 | 162 | ||
158 | public void UpdateGroup(UUID groupID, string charter, bool showInList, UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish) | 163 | public void UpdateGroup(UUID groupID, string charter, bool showInList, |
164 | UUID insigniaID, int membershipFee, bool openEnrollment, | ||
165 | bool allowPublish, bool maturePublish) | ||
159 | { | 166 | { |
160 | Hashtable param = new Hashtable(); | 167 | Hashtable param = new Hashtable(); |
161 | param["GroupID"] = groupID.ToString(); | 168 | param["GroupID"] = groupID.ToString(); |
@@ -170,7 +177,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
170 | XmlRpcCall("groups.updateGroup", param); | 177 | XmlRpcCall("groups.updateGroup", param); |
171 | } | 178 | } |
172 | 179 | ||
173 | public void AddGroupRole(UUID groupID, UUID roleID, string name, string description, string title, ulong powers) | 180 | public void AddGroupRole(UUID groupID, UUID roleID, string name, string description, |
181 | string title, ulong powers) | ||
174 | { | 182 | { |
175 | Hashtable param = new Hashtable(); | 183 | Hashtable param = new Hashtable(); |
176 | param["GroupID"] = groupID.ToString(); | 184 | param["GroupID"] = groupID.ToString(); |
@@ -193,7 +201,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
193 | 201 | ||
194 | } | 202 | } |
195 | 203 | ||
196 | public void UpdateGroupRole(UUID groupID, UUID roleID, string name, string description, string title, ulong powers) | 204 | public void UpdateGroupRole(UUID groupID, UUID roleID, string name, string description, |
205 | string title, ulong powers) | ||
197 | { | 206 | { |
198 | Hashtable param = new Hashtable(); | 207 | Hashtable param = new Hashtable(); |
199 | param["GroupID"] = groupID.ToString(); | 208 | param["GroupID"] = groupID.ToString(); |
@@ -479,11 +488,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
479 | 488 | ||
480 | if (respData.Contains("error")) | 489 | if (respData.Contains("error")) |
481 | { | 490 | { |
482 | return null; | 491 | return null; |
483 | } | 492 | } |
484 | 493 | ||
485 | return HashTableToGroupMembershipData(respData); | 494 | return HashTableToGroupMembershipData(respData); |
486 | } | 495 | } |
487 | 496 | ||
488 | 497 | ||
489 | public List<GroupMembershipData> GetAgentGroupMemberships(UUID AgentID) | 498 | public List<GroupMembershipData> GetAgentGroupMemberships(UUID AgentID) |
@@ -533,8 +542,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
533 | } | 542 | } |
534 | 543 | ||
535 | return Roles; | 544 | return Roles; |
536 | |||
537 | |||
538 | } | 545 | } |
539 | 546 | ||
540 | public List<GroupRolesData> GetGroupRoles(UUID GroupID) | 547 | public List<GroupRolesData> GetGroupRoles(UUID GroupID) |
@@ -565,7 +572,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
565 | } | 572 | } |
566 | 573 | ||
567 | return Roles; | 574 | return Roles; |
568 | |||
569 | } | 575 | } |
570 | 576 | ||
571 | private static GroupMembershipData HashTableToGroupMembershipData(Hashtable respData) | 577 | private static GroupMembershipData HashTableToGroupMembershipData(Hashtable respData) |
@@ -633,7 +639,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
633 | } | 639 | } |
634 | 640 | ||
635 | return members; | 641 | return members; |
636 | |||
637 | } | 642 | } |
638 | 643 | ||
639 | public List<GroupRoleMembersData> GetGroupRoleMembers(UUID GroupID) | 644 | public List<GroupRoleMembersData> GetGroupRoleMembers(UUID GroupID) |
@@ -647,15 +652,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
647 | 652 | ||
648 | if (!respData.Contains("error")) | 653 | if (!respData.Contains("error")) |
649 | { | 654 | { |
650 | foreach (Hashtable membership in respData.Values) | 655 | foreach (Hashtable membership in respData.Values) |
651 | { | 656 | { |
652 | GroupRoleMembersData data = new GroupRoleMembersData(); | 657 | GroupRoleMembersData data = new GroupRoleMembersData(); |
653 | 658 | ||
654 | data.MemberID = new UUID((string)membership["AgentID"]); | 659 | data.MemberID = new UUID((string)membership["AgentID"]); |
655 | data.RoleID = new UUID((string)membership["RoleID"]); | 660 | data.RoleID = new UUID((string)membership["RoleID"]); |
656 | 661 | ||
657 | members.Add(data); | 662 | members.Add(data); |
658 | } | 663 | } |
659 | } | 664 | } |
660 | return members; | 665 | return members; |
661 | } | 666 | } |
@@ -697,8 +702,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
697 | 702 | ||
698 | if (!respData.Contains("error")) | 703 | if (!respData.Contains("error")) |
699 | { | 704 | { |
700 | return null; | 705 | return null; |
701 | } | 706 | } |
702 | 707 | ||
703 | GroupNoticeInfo data = new GroupNoticeInfo(); | 708 | GroupNoticeInfo data = new GroupNoticeInfo(); |
704 | data.GroupID = UUID.Parse((string)respData["GroupID"]); | 709 | data.GroupID = UUID.Parse((string)respData["GroupID"]); |
@@ -799,11 +804,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups | |||
799 | foreach (string line in lines) | 804 | foreach (string line in lines) |
800 | { | 805 | { |
801 | m_log.ErrorFormat("[GROUPDATA] {0}", line); | 806 | m_log.ErrorFormat("[GROUPDATA] {0}", line); |
802 | } | 807 | } |
803 | |||
804 | } | 808 | } |
805 | } | 809 | } |
806 | |||
807 | } | 810 | } |
808 | 811 | ||
809 | public class GroupNoticeInfo | 812 | public class GroupNoticeInfo |