diff options
Diffstat (limited to 'OpenSim/Addons')
5 files changed, 76 insertions, 83 deletions
diff --git a/OpenSim/Addons/Groups/GroupsModule.cs b/OpenSim/Addons/Groups/GroupsModule.cs index 0e3a172..5b76e0a 100644 --- a/OpenSim/Addons/Groups/GroupsModule.cs +++ b/OpenSim/Addons/Groups/GroupsModule.cs | |||
@@ -787,7 +787,7 @@ namespace OpenSim.Groups | |||
787 | remoteClient.SendCreateGroupReply(groupID, true, "Group created successfully"); | 787 | remoteClient.SendCreateGroupReply(groupID, true, "Group created successfully"); |
788 | 788 | ||
789 | // Update the founder with new group information. | 789 | // Update the founder with new group information. |
790 | SendAgentGroupDataUpdate(remoteClient, false); | 790 | SendAgentGroupDataUpdate(remoteClient, true); |
791 | } | 791 | } |
792 | else | 792 | else |
793 | remoteClient.SendCreateGroupReply(groupID, false, reason); | 793 | remoteClient.SendCreateGroupReply(groupID, false, reason); |
diff --git a/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs index af00770..51f3ec1 100644 --- a/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs +++ b/OpenSim/Addons/Groups/Hypergrid/HGGroupsServiceRobustConnector.cs | |||
@@ -115,9 +115,10 @@ namespace OpenSim.Groups | |||
115 | protected override byte[] ProcessRequest(string path, Stream requestData, | 115 | protected override byte[] ProcessRequest(string path, Stream requestData, |
116 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 116 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
117 | { | 117 | { |
118 | StreamReader sr = new StreamReader(requestData); | 118 | string body; |
119 | string body = sr.ReadToEnd(); | 119 | using(StreamReader sr = new StreamReader(requestData)) |
120 | sr.Close(); | 120 | body = sr.ReadToEnd(); |
121 | |||
121 | body = body.Trim(); | 122 | body = body.Trim(); |
122 | 123 | ||
123 | //m_log.DebugFormat("[XXX]: query String: {0}", body); | 124 | //m_log.DebugFormat("[XXX]: query String: {0}", body); |
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs index 598e7a5..8502bb5 100644 --- a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs +++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs | |||
@@ -91,9 +91,10 @@ namespace OpenSim.Groups | |||
91 | protected override byte[] ProcessRequest(string path, Stream requestData, | 91 | protected override byte[] ProcessRequest(string path, Stream requestData, |
92 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) | 92 | IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) |
93 | { | 93 | { |
94 | StreamReader sr = new StreamReader(requestData); | 94 | string body; |
95 | string body = sr.ReadToEnd(); | 95 | using(StreamReader sr = new StreamReader(requestData)) |
96 | sr.Close(); | 96 | body = sr.ReadToEnd(); |
97 | |||
97 | body = body.Trim(); | 98 | body = body.Trim(); |
98 | 99 | ||
99 | //m_log.DebugFormat("[XXX]: query String: {0}", body); | 100 | //m_log.DebugFormat("[XXX]: query String: {0}", body); |
diff --git a/OpenSim/Addons/Groups/Service/GroupsService.cs b/OpenSim/Addons/Groups/Service/GroupsService.cs index ea0fedd..bed91d9 100644 --- a/OpenSim/Addons/Groups/Service/GroupsService.cs +++ b/OpenSim/Addons/Groups/Service/GroupsService.cs | |||
@@ -43,60 +43,62 @@ namespace OpenSim.Groups | |||
43 | { | 43 | { |
44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 44 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | public const GroupPowers DefaultEveryonePowers = GroupPowers.AllowSetHome | | 46 | public const GroupPowers DefaultEveryonePowers = |
47 | GroupPowers.Accountable | | 47 | GroupPowers.AllowSetHome | |
48 | GroupPowers.JoinChat | | 48 | GroupPowers.Accountable | |
49 | GroupPowers.AllowVoiceChat | | 49 | GroupPowers.JoinChat | |
50 | GroupPowers.ReceiveNotices | | 50 | GroupPowers.AllowVoiceChat | |
51 | GroupPowers.StartProposal | | 51 | GroupPowers.ReceiveNotices | |
52 | GroupPowers.VoteOnProposal; | 52 | GroupPowers.StartProposal | |
53 | 53 | GroupPowers.VoteOnProposal; | |
54 | public const GroupPowers OwnerPowers = GroupPowers.Accountable | | 54 | |
55 | GroupPowers.AllowEditLand | | 55 | public const GroupPowers OfficersPowers = 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 | public const GroupPowers OwnerPowers = OfficersPowers | |
91 | GroupPowers.RemoveMember | | 91 | GroupPowers.Accountable | |
92 | GroupPowers.ReturnGroupOwned | | 92 | GroupPowers.AllowEditLand | |
93 | GroupPowers.ReturnGroupSet | | 93 | GroupPowers.AssignMember | |
94 | GroupPowers.ReturnNonGroup | | 94 | GroupPowers.ChangeActions | |
95 | GroupPowers.RoleProperties | | 95 | GroupPowers.CreateRole | |
96 | GroupPowers.SendNotices | | 96 | GroupPowers.DeleteRole | |
97 | GroupPowers.SetLandingPoint | | 97 | GroupPowers.ExperienceAdmin | |
98 | GroupPowers.StartProposal | | 98 | GroupPowers.ExperienceCreator | |
99 | GroupPowers.VoteOnProposal; | 99 | GroupPowers.GroupBanAccess | |
100 | GroupPowers.HostEvent | | ||
101 | GroupPowers.RemoveMember; | ||
100 | 102 | ||
101 | #region Daily Cleanup | 103 | #region Daily Cleanup |
102 | 104 | ||
@@ -151,20 +153,25 @@ namespace OpenSim.Groups | |||
151 | data.Data["ShowInList"] = showInList ? "1" : "0"; | 153 | data.Data["ShowInList"] = showInList ? "1" : "0"; |
152 | data.Data["AllowPublish"] = allowPublish ? "1" : "0"; | 154 | data.Data["AllowPublish"] = allowPublish ? "1" : "0"; |
153 | data.Data["MaturePublish"] = maturePublish ? "1" : "0"; | 155 | data.Data["MaturePublish"] = maturePublish ? "1" : "0"; |
154 | UUID roleID = UUID.Random(); | 156 | UUID ownerRoleID = UUID.Random(); |
155 | data.Data["OwnerRoleID"] = roleID.ToString(); | 157 | data.Data["OwnerRoleID"] = ownerRoleID.ToString(); |
156 | 158 | ||
157 | if (!m_Database.StoreGroup(data)) | 159 | if (!m_Database.StoreGroup(data)) |
158 | return UUID.Zero; | 160 | return UUID.Zero; |
159 | 161 | ||
160 | // Create Everyone role | 162 | // Create Everyone role |
161 | _AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, UUID.Zero, "Everyone", "Everyone in the group", "Member of " + name, (ulong)DefaultEveryonePowers, true); | 163 | _AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, UUID.Zero, "Everyone", "Everyone in the group is in the everyone role.", "Member of " + name, (ulong)DefaultEveryonePowers, true); |
164 | |||
165 | // Create Officers role | ||
166 | UUID officersRoleID = UUID.Random(); | ||
167 | _AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, officersRoleID, "Officers", "The officers of the group, with more powers than regular members.", "Officer of " + name, (ulong)OfficersPowers, true); | ||
162 | 168 | ||
163 | // Create Owner role | 169 | // Create Owner role |
164 | _AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, roleID, "Owners", "Owners of the group", "Owner of " + name, (ulong)OwnerPowers, true); | 170 | _AddOrUpdateGroupRole(RequestingAgentID, data.GroupID, ownerRoleID, "Owners", "Owners of the group", "Owner of " + name, (ulong)OwnerPowers, true); |
165 | 171 | ||
166 | // Add founder to group | 172 | // Add founder to group |
167 | _AddAgentToGroup(RequestingAgentID, founderID.ToString(), data.GroupID, roleID); | 173 | _AddAgentToGroup(RequestingAgentID, founderID.ToString(), data.GroupID, ownerRoleID); |
174 | _AddAgentToGroup(RequestingAgentID, founderID.ToString(), data.GroupID, officersRoleID); | ||
168 | 175 | ||
169 | return data.GroupID; | 176 | return data.GroupID; |
170 | } | 177 | } |
@@ -843,7 +850,7 @@ namespace OpenSim.Groups | |||
843 | return false; | 850 | return false; |
844 | } | 851 | } |
845 | 852 | ||
846 | if (!add && data == null) // it deosn't exist, can't update | 853 | if (!add && data == null) // it doesn't exist, can't update |
847 | { | 854 | { |
848 | m_log.DebugFormat("[Groups]: Group {0} doesn't exist. Can't update it", groupID); | 855 | m_log.DebugFormat("[Groups]: Group {0} doesn't exist. Can't update it", groupID); |
849 | return false; | 856 | return false; |
diff --git a/OpenSim/Addons/OfflineIM/OfflineIMRegionModule.cs b/OpenSim/Addons/OfflineIM/OfflineIMRegionModule.cs index 5340bcd..d8164e7 100644 --- a/OpenSim/Addons/OfflineIM/OfflineIMRegionModule.cs +++ b/OpenSim/Addons/OfflineIM/OfflineIMRegionModule.cs | |||
@@ -114,7 +114,6 @@ namespace OpenSim.OfflineIM | |||
114 | scene.ForEachClient(delegate(IClientAPI client) | 114 | scene.ForEachClient(delegate(IClientAPI client) |
115 | { | 115 | { |
116 | client.OnRetrieveInstantMessages -= RetrieveInstantMessages; | 116 | client.OnRetrieveInstantMessages -= RetrieveInstantMessages; |
117 | client.OnMuteListRequest -= OnMuteListRequest; | ||
118 | }); | 117 | }); |
119 | } | 118 | } |
120 | 119 | ||
@@ -162,7 +161,6 @@ namespace OpenSim.OfflineIM | |||
162 | private void OnNewClient(IClientAPI client) | 161 | private void OnNewClient(IClientAPI client) |
163 | { | 162 | { |
164 | client.OnRetrieveInstantMessages += RetrieveInstantMessages; | 163 | client.OnRetrieveInstantMessages += RetrieveInstantMessages; |
165 | client.OnMuteListRequest += OnMuteListRequest; | ||
166 | } | 164 | } |
167 | 165 | ||
168 | private void RetrieveInstantMessages(IClientAPI client) | 166 | private void RetrieveInstantMessages(IClientAPI client) |
@@ -194,20 +192,6 @@ namespace OpenSim.OfflineIM | |||
194 | } | 192 | } |
195 | } | 193 | } |
196 | 194 | ||
197 | // Apparently this is needed in order for the viewer to request the IMs. | ||
198 | private void OnMuteListRequest(IClientAPI client, uint crc) | ||
199 | { | ||
200 | m_log.DebugFormat("[OfflineIM.V2] Got mute list request for crc {0}", crc); | ||
201 | string filename = "mutes" + client.AgentId.ToString(); | ||
202 | |||
203 | IXfer xfer = client.Scene.RequestModuleInterface<IXfer>(); | ||
204 | if (xfer != null) | ||
205 | { | ||
206 | xfer.AddNewFile(filename, new Byte[0]); | ||
207 | client.SendMuteListUpdate(filename); | ||
208 | } | ||
209 | } | ||
210 | |||
211 | private void UndeliveredMessage(GridInstantMessage im) | 195 | private void UndeliveredMessage(GridInstantMessage im) |
212 | { | 196 | { |
213 | if (im.dialog != (byte)InstantMessageDialog.MessageFromObject && | 197 | if (im.dialog != (byte)InstantMessageDialog.MessageFromObject && |