diff options
author | Melanie | 2010-01-09 14:17:44 +0000 |
---|---|---|
committer | Melanie | 2010-01-09 14:17:44 +0000 |
commit | 063f106cbbc2a805dc210fe16c30741ab24876cb (patch) | |
tree | 5c338b086d342c21ee7ce26663bd92195d91a139 | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC_OLD-063f106cbbc2a805dc210fe16c30741ab24876cb.zip opensim-SC_OLD-063f106cbbc2a805dc210fe16c30741ab24876cb.tar.gz opensim-SC_OLD-063f106cbbc2a805dc210fe16c30741ab24876cb.tar.bz2 opensim-SC_OLD-063f106cbbc2a805dc210fe16c30741ab24876cb.tar.xz |
Add functionality to estate "Allowed Users" and "Allowed Groups". Allowed users
will be honored now, while allowed groups will not. This requires additional
groups module integration work
11 files changed, 197 insertions, 108 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index 6bf976c..3c98229 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs | |||
@@ -1217,7 +1217,7 @@ namespace OpenSim.Client.MXP.ClientStack | |||
1217 | // Need to translate to MXP somehow | 1217 | // Need to translate to MXP somehow |
1218 | } | 1218 | } |
1219 | 1219 | ||
1220 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 1220 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
1221 | { | 1221 | { |
1222 | // Need to translate to MXP somehow | 1222 | // Need to translate to MXP somehow |
1223 | } | 1223 | } |
diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs index 8e5efe4..30d1575 100644 --- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs +++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs | |||
@@ -760,7 +760,7 @@ namespace OpenSim.Client.Sirikata.ClientStack | |||
760 | throw new System.NotImplementedException(); | 760 | throw new System.NotImplementedException(); |
761 | } | 761 | } |
762 | 762 | ||
763 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 763 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
764 | { | 764 | { |
765 | throw new System.NotImplementedException(); | 765 | throw new System.NotImplementedException(); |
766 | } | 766 | } |
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index f23acdc..6a119bd 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs | |||
@@ -767,7 +767,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack | |||
767 | throw new System.NotImplementedException(); | 767 | throw new System.NotImplementedException(); |
768 | } | 768 | } |
769 | 769 | ||
770 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 770 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
771 | { | 771 | { |
772 | throw new System.NotImplementedException(); | 772 | throw new System.NotImplementedException(); |
773 | } | 773 | } |
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index deced98..b4b5808 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -300,6 +300,34 @@ namespace OpenSim.Framework | |||
300 | OnSave(this); | 300 | OnSave(this); |
301 | } | 301 | } |
302 | 302 | ||
303 | public void AddEstateUser(UUID avatarID) | ||
304 | { | ||
305 | if (avatarID == UUID.Zero) | ||
306 | return; | ||
307 | if (!l_EstateAccess.Contains(avatarID)) | ||
308 | l_EstateAccess.Add(avatarID); | ||
309 | } | ||
310 | |||
311 | public void RemoveEstateUser(UUID avatarID) | ||
312 | { | ||
313 | if (l_EstateAccess.Contains(avatarID)) | ||
314 | l_EstateAccess.Remove(avatarID); | ||
315 | } | ||
316 | |||
317 | public void AddEstateGroup(UUID avatarID) | ||
318 | { | ||
319 | if (avatarID == UUID.Zero) | ||
320 | return; | ||
321 | if (!l_EstateGroups.Contains(avatarID)) | ||
322 | l_EstateGroups.Add(avatarID); | ||
323 | } | ||
324 | |||
325 | public void RemoveEstateGroup(UUID avatarID) | ||
326 | { | ||
327 | if (l_EstateGroups.Contains(avatarID)) | ||
328 | l_EstateGroups.Remove(avatarID); | ||
329 | } | ||
330 | |||
303 | public void AddEstateManager(UUID avatarID) | 331 | public void AddEstateManager(UUID avatarID) |
304 | { | 332 | { |
305 | if (avatarID == UUID.Zero) | 333 | if (avatarID == UUID.Zero) |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 0efc2a4..3489af1 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -1271,7 +1271,7 @@ namespace OpenSim.Framework | |||
1271 | void SendHealth(float health); | 1271 | void SendHealth(float health); |
1272 | 1272 | ||
1273 | 1273 | ||
1274 | void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID); | 1274 | void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID); |
1275 | 1275 | ||
1276 | void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID); | 1276 | void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID); |
1277 | 1277 | ||
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 7d90a68..3d3c324 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -3912,7 +3912,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3912 | return false; | 3912 | return false; |
3913 | } | 3913 | } |
3914 | 3914 | ||
3915 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 3915 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
3916 | |||
3916 | { | 3917 | { |
3917 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); | 3918 | EstateOwnerMessagePacket packet = new EstateOwnerMessagePacket(); |
3918 | packet.AgentData.TransactionID = UUID.Random(); | 3919 | packet.AgentData.TransactionID = UUID.Random(); |
@@ -3921,26 +3922,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3921 | packet.MethodData.Invoice = invoice; | 3922 | packet.MethodData.Invoice = invoice; |
3922 | packet.MethodData.Method = Utils.StringToBytes("setaccess"); | 3923 | packet.MethodData.Method = Utils.StringToBytes("setaccess"); |
3923 | 3924 | ||
3924 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + EstateManagers.Length]; | 3925 | EstateOwnerMessagePacket.ParamListBlock[] returnblock = new EstateOwnerMessagePacket.ParamListBlock[6 + Data.Length]; |
3925 | 3926 | ||
3926 | for (int i = 0; i < (6 + EstateManagers.Length); i++) | 3927 | for (int i = 0; i < (6 + Data.Length); i++) |
3927 | { | 3928 | { |
3928 | returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); | 3929 | returnblock[i] = new EstateOwnerMessagePacket.ParamListBlock(); |
3929 | } | 3930 | } |
3930 | int j = 0; | 3931 | int j = 0; |
3931 | 3932 | ||
3932 | returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; | 3933 | returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++; |
3933 | returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateManagers).ToString()); j++; | 3934 | returnblock[j].Parameter = Utils.StringToBytes(code.ToString()); j++; |
3934 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; | 3935 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
3935 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; | 3936 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
3936 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; | 3937 | returnblock[j].Parameter = Utils.StringToBytes("0"); j++; |
3937 | returnblock[j].Parameter = Utils.StringToBytes(EstateManagers.Length.ToString()); j++; | 3938 | returnblock[j].Parameter = Utils.StringToBytes(Data.Length.ToString()); j++; |
3938 | for (int i = 0; i < EstateManagers.Length; i++) | 3939 | for (int i = 0; i < Data.Length; i++) |
3939 | { | 3940 | { |
3940 | returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; | 3941 | returnblock[j].Parameter = Data[i].GetBytes(); j++; |
3941 | } | 3942 | } |
3942 | packet.ParamList = returnblock; | 3943 | packet.ParamList = returnblock; |
3943 | packet.Header.Reliable = false; | 3944 | packet.Header.Reliable = true; |
3944 | OutPacket(packet, ThrottleOutPacketType.Task); | 3945 | OutPacket(packet, ThrottleOutPacketType.Task); |
3945 | } | 3946 | } |
3946 | 3947 | ||
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index b1dcb14..deade6b 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -75,10 +75,21 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
75 | m_scene.RegionInfo.EstateSettings.AbuseEmail, | 75 | m_scene.RegionInfo.EstateSettings.AbuseEmail, |
76 | estateOwner); | 76 | estateOwner); |
77 | 77 | ||
78 | remote_client.SendEstateManagersList(invoice, | 78 | remote_client.SendEstateList(invoice, |
79 | (int)Constants.EstateAccessCodex.EstateManagers, | ||
79 | m_scene.RegionInfo.EstateSettings.EstateManagers, | 80 | m_scene.RegionInfo.EstateSettings.EstateManagers, |
80 | m_scene.RegionInfo.EstateSettings.EstateID); | 81 | m_scene.RegionInfo.EstateSettings.EstateID); |
81 | 82 | ||
83 | remote_client.SendEstateList(invoice, | ||
84 | (int)Constants.EstateAccessCodex.AccessOptions, | ||
85 | m_scene.RegionInfo.EstateSettings.EstateAccess, | ||
86 | m_scene.RegionInfo.EstateSettings.EstateID); | ||
87 | |||
88 | remote_client.SendEstateList(invoice, | ||
89 | (int)Constants.EstateAccessCodex.AllowedGroups, | ||
90 | m_scene.RegionInfo.EstateSettings.EstateGroups, | ||
91 | m_scene.RegionInfo.EstateSettings.EstateID); | ||
92 | |||
82 | remote_client.SendBannedUserList(invoice, | 93 | remote_client.SendBannedUserList(invoice, |
83 | m_scene.RegionInfo.EstateSettings.EstateBans, | 94 | m_scene.RegionInfo.EstateSettings.EstateBans, |
84 | m_scene.RegionInfo.EstateSettings.EstateID); | 95 | m_scene.RegionInfo.EstateSettings.EstateID); |
@@ -233,127 +244,176 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
233 | if (user == m_scene.RegionInfo.MasterAvatarAssignedUUID) | 244 | if (user == m_scene.RegionInfo.MasterAvatarAssignedUUID) |
234 | return; // never process owner | 245 | return; // never process owner |
235 | 246 | ||
236 | switch (estateAccessType) | 247 | if ((estateAccessType & 4) != 0) // User add |
237 | { | 248 | { |
238 | case 64: | 249 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) |
239 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | 250 | { |
240 | { | 251 | m_scene.RegionInfo.EstateSettings.AddEstateUser(user); |
241 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | 252 | m_scene.RegionInfo.EstateSettings.Save(); |
242 | 253 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID); | |
243 | bool alreadyInList = false; | 254 | } |
244 | 255 | else | |
245 | for (int i = 0; i < banlistcheck.Length; i++) | 256 | { |
246 | { | 257 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); |
247 | if (user == banlistcheck[i].BannedUserID) | 258 | } |
248 | { | ||
249 | alreadyInList = true; | ||
250 | break; | ||
251 | } | ||
252 | |||
253 | } | ||
254 | if (!alreadyInList) | ||
255 | { | ||
256 | 259 | ||
257 | EstateBan item = new EstateBan(); | 260 | } |
261 | if ((estateAccessType & 8) != 0) // User remove | ||
262 | { | ||
263 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
264 | { | ||
265 | m_scene.RegionInfo.EstateSettings.RemoveEstateUser(user); | ||
266 | m_scene.RegionInfo.EstateSettings.Save(); | ||
258 | 267 | ||
259 | item.BannedUserID = user; | 268 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AccessOptions, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID); |
260 | item.EstateID = m_scene.RegionInfo.EstateSettings.EstateID; | 269 | } |
261 | item.BannedHostAddress = "0.0.0.0"; | 270 | else |
262 | item.BannedHostIPMask = "0.0.0.0"; | 271 | { |
272 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
273 | } | ||
274 | } | ||
275 | if ((estateAccessType & 16) != 0) // Group add | ||
276 | { | ||
277 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
278 | { | ||
279 | m_scene.RegionInfo.EstateSettings.AddEstateGroup(user); | ||
280 | m_scene.RegionInfo.EstateSettings.Save(); | ||
281 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID); | ||
282 | } | ||
283 | else | ||
284 | { | ||
285 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
286 | } | ||
287 | } | ||
288 | if ((estateAccessType & 32) != 0) // Group remove | ||
289 | { | ||
290 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
291 | { | ||
292 | m_scene.RegionInfo.EstateSettings.RemoveEstateGroup(user); | ||
293 | m_scene.RegionInfo.EstateSettings.Save(); | ||
263 | 294 | ||
264 | m_scene.RegionInfo.EstateSettings.AddBan(item); | 295 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.AllowedGroups, m_scene.RegionInfo.EstateSettings.EstateAccess, m_scene.RegionInfo.EstateSettings.EstateID); |
265 | m_scene.RegionInfo.EstateSettings.Save(); | 296 | } |
297 | else | ||
298 | { | ||
299 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
300 | } | ||
301 | } | ||
302 | if ((estateAccessType & 64) != 0) // Ban add | ||
303 | { | ||
304 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | ||
305 | { | ||
306 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | ||
266 | 307 | ||
267 | ScenePresence s = m_scene.GetScenePresence(user); | 308 | bool alreadyInList = false; |
268 | if (s != null) | ||
269 | { | ||
270 | if (!s.IsChildAgent) | ||
271 | { | ||
272 | s.ControllingClient.SendTeleportLocationStart(); | ||
273 | m_scene.TeleportClientHome(user, s.ControllingClient); | ||
274 | } | ||
275 | } | ||
276 | 309 | ||
277 | } | 310 | for (int i = 0; i < banlistcheck.Length; i++) |
278 | else | 311 | { |
312 | if (user == banlistcheck[i].BannedUserID) | ||
279 | { | 313 | { |
280 | remote_client.SendAlertMessage("User is already on the region ban list"); | 314 | alreadyInList = true; |
315 | break; | ||
281 | } | 316 | } |
282 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); | 317 | |
283 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); | ||
284 | } | ||
285 | else | ||
286 | { | ||
287 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
288 | } | 318 | } |
289 | break; | 319 | if (!alreadyInList) |
290 | case 128: | ||
291 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | ||
292 | { | 320 | { |
293 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | ||
294 | 321 | ||
295 | bool alreadyInList = false; | 322 | EstateBan item = new EstateBan(); |
296 | EstateBan listitem = null; | 323 | |
324 | item.BannedUserID = user; | ||
325 | item.EstateID = m_scene.RegionInfo.EstateSettings.EstateID; | ||
326 | item.BannedHostAddress = "0.0.0.0"; | ||
327 | item.BannedHostIPMask = "0.0.0.0"; | ||
297 | 328 | ||
298 | for (int i = 0; i < banlistcheck.Length; i++) | 329 | m_scene.RegionInfo.EstateSettings.AddBan(item); |
330 | m_scene.RegionInfo.EstateSettings.Save(); | ||
331 | |||
332 | ScenePresence s = m_scene.GetScenePresence(user); | ||
333 | if (s != null) | ||
299 | { | 334 | { |
300 | if (user == banlistcheck[i].BannedUserID) | 335 | if (!s.IsChildAgent) |
301 | { | 336 | { |
302 | alreadyInList = true; | 337 | s.ControllingClient.SendTeleportLocationStart(); |
303 | listitem = banlistcheck[i]; | 338 | m_scene.TeleportClientHome(user, s.ControllingClient); |
304 | break; | ||
305 | } | 339 | } |
306 | |||
307 | } | 340 | } |
308 | if (alreadyInList && listitem != null) | 341 | |
309 | { | ||
310 | m_scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); | ||
311 | m_scene.RegionInfo.EstateSettings.Save(); | ||
312 | } | ||
313 | else | ||
314 | { | ||
315 | remote_client.SendAlertMessage("User is not on the region ban list"); | ||
316 | } | ||
317 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); | ||
318 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); | ||
319 | } | 342 | } |
320 | else | 343 | else |
321 | { | 344 | { |
322 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | 345 | remote_client.SendAlertMessage("User is already on the region ban list"); |
323 | } | 346 | } |
324 | break; | 347 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); |
325 | case 256: | 348 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); |
349 | } | ||
350 | else | ||
351 | { | ||
352 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
353 | } | ||
354 | } | ||
355 | if ((estateAccessType & 128) != 0) // Ban remove | ||
356 | { | ||
357 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, false) || m_scene.Permissions.BypassPermissions()) | ||
358 | { | ||
359 | EstateBan[] banlistcheck = m_scene.RegionInfo.EstateSettings.EstateBans; | ||
326 | 360 | ||
327 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | 361 | bool alreadyInList = false; |
328 | { | 362 | EstateBan listitem = null; |
329 | m_scene.RegionInfo.EstateSettings.AddEstateManager(user); | 363 | |
330 | m_scene.RegionInfo.EstateSettings.Save(); | 364 | for (int i = 0; i < banlistcheck.Length; i++) |
331 | remote_client.SendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | ||
332 | } | ||
333 | else | ||
334 | { | 365 | { |
335 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | 366 | if (user == banlistcheck[i].BannedUserID) |
336 | } | 367 | { |
368 | alreadyInList = true; | ||
369 | listitem = banlistcheck[i]; | ||
370 | break; | ||
371 | } | ||
337 | 372 | ||
338 | break; | 373 | } |
339 | case 512: | 374 | if (alreadyInList && listitem != null) |
340 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
341 | { | 375 | { |
342 | m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user); | 376 | m_scene.RegionInfo.EstateSettings.RemoveBan(listitem.BannedUserID); |
343 | m_scene.RegionInfo.EstateSettings.Save(); | 377 | m_scene.RegionInfo.EstateSettings.Save(); |
344 | |||
345 | remote_client.SendEstateManagersList(invoice, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | ||
346 | } | 378 | } |
347 | else | 379 | else |
348 | { | 380 | { |
349 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | 381 | remote_client.SendAlertMessage("User is not on the region ban list"); |
350 | } | 382 | } |
351 | break; | 383 | //m_scene.RegionInfo.regionBanlist.Add(Manager(user); |
352 | 384 | remote_client.SendBannedUserList(invoice, m_scene.RegionInfo.EstateSettings.EstateBans, m_scene.RegionInfo.EstateSettings.EstateID); | |
353 | default: | 385 | } |
386 | else | ||
387 | { | ||
388 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
389 | } | ||
390 | } | ||
391 | if ((estateAccessType & 256) != 0) // Manager add | ||
392 | { | ||
393 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
394 | { | ||
395 | m_scene.RegionInfo.EstateSettings.AddEstateManager(user); | ||
396 | m_scene.RegionInfo.EstateSettings.Save(); | ||
397 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); | ||
398 | } | ||
399 | else | ||
400 | { | ||
401 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
402 | } | ||
403 | } | ||
404 | if ((estateAccessType & 512) != 0) // Manager remove | ||
405 | { | ||
406 | if (m_scene.Permissions.CanIssueEstateCommand(remote_client.AgentId, true) || m_scene.Permissions.BypassPermissions()) | ||
407 | { | ||
408 | m_scene.RegionInfo.EstateSettings.RemoveEstateManager(user); | ||
409 | m_scene.RegionInfo.EstateSettings.Save(); | ||
354 | 410 | ||
355 | m_log.ErrorFormat("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta: {0}", estateAccessType.ToString()); | 411 | remote_client.SendEstateList(invoice, (int)Constants.EstateAccessCodex.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateManagers, m_scene.RegionInfo.EstateSettings.EstateID); |
356 | break; | 412 | } |
413 | else | ||
414 | { | ||
415 | remote_client.SendAlertMessage("Method EstateAccessDelta Failed, you don't have permissions"); | ||
416 | } | ||
357 | } | 417 | } |
358 | } | 418 | } |
359 | 419 | ||
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index d5218b5..1dfa1b1 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -879,7 +879,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
879 | { | 879 | { |
880 | } | 880 | } |
881 | 881 | ||
882 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 882 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
883 | { | 883 | { |
884 | } | 884 | } |
885 | 885 | ||
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 55bbed9..6785c08 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -1220,7 +1220,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
1220 | 1220 | ||
1221 | } | 1221 | } |
1222 | 1222 | ||
1223 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 1223 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
1224 | { | 1224 | { |
1225 | 1225 | ||
1226 | } | 1226 | } |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index fa47d16..4a4c515 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -897,7 +897,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
897 | { | 897 | { |
898 | } | 898 | } |
899 | 899 | ||
900 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 900 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
901 | { | 901 | { |
902 | } | 902 | } |
903 | 903 | ||
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 93cab0e..8b79502 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -924,7 +924,7 @@ namespace OpenSim.Tests.Common.Mock | |||
924 | { | 924 | { |
925 | } | 925 | } |
926 | 926 | ||
927 | public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) | 927 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) |
928 | { | 928 | { |
929 | } | 929 | } |
930 | 930 | ||