diff options
Diffstat (limited to 'OpenSim/Addons/Groups')
-rw-r--r-- | OpenSim/Addons/Groups/Service/GroupsService.cs | 111 |
1 files changed, 60 insertions, 51 deletions
diff --git a/OpenSim/Addons/Groups/Service/GroupsService.cs b/OpenSim/Addons/Groups/Service/GroupsService.cs index ea0fedd..c7763c9 100644 --- a/OpenSim/Addons/Groups/Service/GroupsService.cs +++ b/OpenSim/Addons/Groups/Service/GroupsService.cs | |||
@@ -51,52 +51,56 @@ namespace OpenSim.Groups | |||
51 | GroupPowers.StartProposal | | 51 | GroupPowers.StartProposal | |
52 | GroupPowers.VoteOnProposal; | 52 | GroupPowers.VoteOnProposal; |
53 | 53 | ||
54 | public const GroupPowers OwnerPowers = GroupPowers.Accountable | | 54 | public const GroupPowers OfficersPowers = |
55 | GroupPowers.AllowEditLand | | 55 | (GroupPowers)DefaultEveryonePowers | |
56 | GroupPowers.AllowFly | | 56 | GroupPowers.AllowFly | |
57 | GroupPowers.AllowLandmark | | 57 | GroupPowers.AllowLandmark | |
58 | GroupPowers.AllowRez | | 58 | GroupPowers.AllowRez | |
59 | GroupPowers.AllowSetHome | | 59 | GroupPowers.AssignMemberLimited | |
60 | GroupPowers.AllowVoiceChat | | 60 | GroupPowers.ChangeIdentity | |
61 | GroupPowers.AssignMember | | 61 | GroupPowers.ChangeMedia | |
62 | GroupPowers.AssignMemberLimited | | 62 | GroupPowers.ChangeOptions | |
63 | GroupPowers.ChangeActions | | 63 | GroupPowers.DeedObject | |
64 | GroupPowers.ChangeIdentity | | 64 | GroupPowers.Eject | |
65 | GroupPowers.ChangeMedia | | 65 | GroupPowers.FindPlaces | |
66 | GroupPowers.ChangeOptions | | 66 | GroupPowers.Invite | |
67 | GroupPowers.CreateRole | | 67 | GroupPowers.LandChangeIdentity | |
68 | GroupPowers.DeedObject | | 68 | GroupPowers.LandDeed | |
69 | GroupPowers.DeleteRole | | 69 | GroupPowers.LandDivideJoin | |
70 | GroupPowers.Eject | | 70 | GroupPowers.LandEdit | |
71 | GroupPowers.FindPlaces | | 71 | GroupPowers.LandEjectAndFreeze | |
72 | GroupPowers.HostEvent | | 72 | GroupPowers.LandGardening | |
73 | GroupPowers.Invite | | 73 | GroupPowers.LandManageAllowed | |
74 | GroupPowers.JoinChat | | 74 | GroupPowers.LandManageBanned | |
75 | GroupPowers.LandChangeIdentity | | 75 | GroupPowers.LandManagePasses | |
76 | GroupPowers.LandDeed | | 76 | GroupPowers.LandOptions | |
77 | GroupPowers.LandDivideJoin | | 77 | GroupPowers.LandRelease | |
78 | GroupPowers.LandEdit | | 78 | GroupPowers.LandSetSale | |
79 | GroupPowers.LandEjectAndFreeze | | 79 | GroupPowers.MemberVisible | |
80 | GroupPowers.LandGardening | | 80 | GroupPowers.ModerateChat | |
81 | GroupPowers.LandManageAllowed | | 81 | GroupPowers.ObjectManipulate | |
82 | GroupPowers.LandManageBanned | | 82 | GroupPowers.ObjectSetForSale | |
83 | GroupPowers.LandManagePasses | | 83 | GroupPowers.ReturnGroupOwned | |
84 | GroupPowers.LandOptions | | 84 | GroupPowers.ReturnGroupSet | |
85 | GroupPowers.LandRelease | | 85 | GroupPowers.ReturnNonGroup | |
86 | GroupPowers.LandSetSale | | 86 | GroupPowers.RoleProperties | |
87 | GroupPowers.ModerateChat | | 87 | GroupPowers.SendNotices | |
88 | GroupPowers.ObjectManipulate | | 88 | GroupPowers.SetLandingPoint; |
89 | GroupPowers.ObjectSetForSale | | 89 | |
90 | GroupPowers.ReceiveNotices | | 90 | |
91 | GroupPowers.RemoveMember | | 91 | public const GroupPowers OwnerPowers = |
92 | GroupPowers.ReturnGroupOwned | | 92 | (GroupPowers)OfficersPowers | |
93 | GroupPowers.ReturnGroupSet | | 93 | GroupPowers.Accountable | |
94 | GroupPowers.ReturnNonGroup | | 94 | GroupPowers.AllowEditLand | |
95 | GroupPowers.RoleProperties | | 95 | GroupPowers.AssignMember | |
96 | GroupPowers.SendNotices | | 96 | GroupPowers.ChangeActions | |
97 | GroupPowers.SetLandingPoint | | 97 | GroupPowers.CreateRole | |
98 | GroupPowers.StartProposal | | 98 | GroupPowers.DeleteRole | |
99 | GroupPowers.VoteOnProposal; | 99 | GroupPowers.ExperienceAdmin | |
100 | GroupPowers.ExperienceCreator | | ||
101 | GroupPowers.GroupBanAccess | | ||
102 | GroupPowers.HostEvent | | ||
103 | GroupPowers.RemoveMember; | ||
100 | 104 | ||
101 | #region Daily Cleanup | 105 | #region Daily Cleanup |
102 | 106 | ||
@@ -151,20 +155,25 @@ namespace OpenSim.Groups | |||
151 | data.Data["ShowInList"] = showInList ? "1" : "0"; | 155 | data.Data["ShowInList"] = showInList ? "1" : "0"; |
152 | data.Data["AllowPublish"] = allowPublish ? "1" : "0"; | 156 | data.Data["AllowPublish"] = allowPublish ? "1" : "0"; |
153 | data.Data["MaturePublish"] = maturePublish ? "1" : "0"; | 157 | data.Data["MaturePublish"] = maturePublish ? "1" : "0"; |
154 | UUID roleID = UUID.Random(); | 158 | UUID ownerRoleID = UUID.Random(); |
155 | data.Data["OwnerRoleID"] = roleID.ToString(); | 159 | data.Data["OwnerRoleID"] = ownerRoleID.ToString(); |
156 | 160 | ||
157 | if (!m_Database.StoreGroup(data)) | 161 | if (!m_Database.StoreGroup(data)) |
158 | return UUID.Zero; | 162 | return UUID.Zero; |
159 | 163 | ||
160 | // Create Everyone role | 164 | // Create Everyone role |
161 | _AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, UUID.Zero, "Everyone", "Everyone in the group", "Member of " + name, (ulong)DefaultEveryonePowers, true); | 165 | _AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, UUID.Zero, "Everyone", "Everyone in the group is in the everyone role.", "Member of " + name, (ulong)DefaultEveryonePowers, true); |
166 | |||
167 | // Create Officers role | ||
168 | UUID officersRoleID = UUID.Random(); | ||
169 | _AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, officersRoleID, "Officers", "The officers of the group, with more powers than regular members.", "Officer of " + name, (ulong)OfficersPowers, true); | ||
162 | 170 | ||
163 | // Create Owner role | 171 | // Create Owner role |
164 | _AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, roleID, "Owners", "Owners of the group", "Owner of " + name, (ulong)OwnerPowers, true); | 172 | _AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, ownerRoleID, "Owners", "Owners of the group", "Owner of " + name, (ulong)OwnerPowers, true); |
165 | 173 | ||
166 | // Add founder to group | 174 | // Add founder to group |
167 | _AddAgentToGroup(RequestingAgentID, founderID.ToString(), data.GroupID, roleID); | 175 | _AddAgentToGroup(RequestingAgentID, founderID.ToString(), data.GroupID, ownerRoleID); |
176 | _AddAgentToGroup(RequestingAgentID, founderID.ToString(), data.GroupID, officersRoleID); | ||
168 | 177 | ||
169 | return data.GroupID; | 178 | return data.GroupID; |
170 | } | 179 | } |