diff options
8 files changed, 139 insertions, 17 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index 2a495b0..98604f2 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -373,5 +373,11 @@ namespace OpenSim.Framework | |||
373 | 373 | ||
374 | return l_EstateAccess.Contains(user); | 374 | return l_EstateAccess.Contains(user); |
375 | } | 375 | } |
376 | |||
377 | public bool GroupAccess(UUID groupID) | ||
378 | { | ||
379 | return l_EstateGroups.Contains(groupID); | ||
380 | } | ||
381 | |||
376 | } | 382 | } |
377 | } | 383 | } |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index 1a9313b..4ae96f0 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -489,18 +489,20 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
489 | List<mapItemReply> mapitems = new List<mapItemReply>(); | 489 | List<mapItemReply> mapitems = new List<mapItemReply>(); |
490 | mapItemReply mapitem = new mapItemReply(); | 490 | mapItemReply mapitem = new mapItemReply(); |
491 | 491 | ||
492 | SceneObjectPart sop = m_scene.GetSceneObjectPart(m_scene.RegionInfo.RegionSettings.TelehubObject); | 492 | SceneObjectGroup sog = m_scene.GetSceneObjectGroup(m_scene.RegionInfo.RegionSettings.TelehubObject); |
493 | 493 | if (sog != null) | |
494 | mapitem = new mapItemReply(); | 494 | { |
495 | mapitem.x = (uint)(xstart + sop.AbsolutePosition.X); | 495 | mapitem = new mapItemReply(); |
496 | mapitem.y = (uint)(ystart + sop.AbsolutePosition.Y); | 496 | mapitem.x = (uint)(xstart + sog.AbsolutePosition.X); |
497 | mapitem.id = UUID.Zero; | 497 | mapitem.y = (uint)(ystart + sog.AbsolutePosition.Y); |
498 | mapitem.name = sop.Name; | 498 | mapitem.id = UUID.Zero; |
499 | mapitem.Extra = 0; // color (not used) | 499 | mapitem.name = sog.Name; |
500 | mapitem.Extra2 = 0; // 0 = telehub / 1 = infohub | 500 | mapitem.Extra = 0; // color (not used) |
501 | mapitems.Add(mapitem); | 501 | mapitem.Extra2 = 0; // 0 = telehub / 1 = infohub |
502 | mapitems.Add(mapitem); | ||
502 | 503 | ||
503 | remoteClient.SendMapItemReply(mapitems.ToArray(), itemtype, flags); | 504 | remoteClient.SendMapItemReply(mapitems.ToArray(), itemtype, flags); |
505 | } | ||
504 | } | 506 | } |
505 | else | 507 | else |
506 | { | 508 | { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index f03c345..984058c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -5067,6 +5067,36 @@ namespace OpenSim.Region.Framework.Scenes | |||
5067 | } | 5067 | } |
5068 | } | 5068 | } |
5069 | 5069 | ||
5070 | if (position == Vector3.Zero) // Teleport | ||
5071 | { | ||
5072 | if (!RegionInfo.EstateSettings.AllowDirectTeleport) | ||
5073 | { | ||
5074 | SceneObjectGroup telehub; | ||
5075 | if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && (telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject)) != null) | ||
5076 | { | ||
5077 | List<SpawnPoint> spawnPoints = RegionInfo.RegionSettings.SpawnPoints(); | ||
5078 | bool banned = true; | ||
5079 | foreach (SpawnPoint sp in spawnPoints) | ||
5080 | { | ||
5081 | Vector3 spawnPoint = sp.GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); | ||
5082 | ILandObject land = LandChannel.GetLandObject(spawnPoint.X, spawnPoint.Y); | ||
5083 | if (land == null) | ||
5084 | continue; | ||
5085 | if (land.IsEitherBannedOrRestricted(agentID)) | ||
5086 | continue; | ||
5087 | banned = false; | ||
5088 | break; | ||
5089 | } | ||
5090 | |||
5091 | if (banned) | ||
5092 | { | ||
5093 | reason = "No suitable landing point found"; | ||
5094 | return false; | ||
5095 | } | ||
5096 | } | ||
5097 | } | ||
5098 | } | ||
5099 | |||
5070 | reason = String.Empty; | 5100 | reason = String.Empty; |
5071 | return true; | 5101 | return true; |
5072 | } | 5102 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 6fa812d..fb5fd45 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -10646,6 +10646,75 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10646 | return list; | 10646 | return list; |
10647 | } | 10647 | } |
10648 | 10648 | ||
10649 | public LSL_Integer llManageEstateAccess(int action, string avatar) | ||
10650 | { | ||
10651 | m_host.AddScriptLPS(1); | ||
10652 | EstateSettings estate = World.RegionInfo.EstateSettings; | ||
10653 | bool isAccount = false; | ||
10654 | bool isGroup = false; | ||
10655 | |||
10656 | if (!estate.IsEstateOwner(m_host.OwnerID) || !estate.IsEstateManager(m_host.OwnerID)) | ||
10657 | return 0; | ||
10658 | |||
10659 | UUID id = new UUID(); | ||
10660 | if (!UUID.TryParse(avatar, out id)) | ||
10661 | return 0; | ||
10662 | |||
10663 | UserAccount account = World.UserAccountService.GetUserAccount(World.RegionInfo.ScopeID, id); | ||
10664 | isAccount = account != null ? true : false; | ||
10665 | if (!isAccount) | ||
10666 | { | ||
10667 | IGroupsModule groups = World.RequestModuleInterface<IGroupsModule>(); | ||
10668 | if (groups != null) | ||
10669 | { | ||
10670 | GroupRecord group = groups.GetGroupRecord(id); | ||
10671 | isGroup = group != null ? true : false; | ||
10672 | if (!isGroup) | ||
10673 | return 0; | ||
10674 | } | ||
10675 | else | ||
10676 | return 0; | ||
10677 | } | ||
10678 | |||
10679 | switch (action) | ||
10680 | { | ||
10681 | case ScriptBaseClass.ESTATE_ACCESS_ALLOWED_AGENT_ADD: | ||
10682 | if (!isAccount) return 0; | ||
10683 | if (estate.HasAccess(id)) return 1; | ||
10684 | if (estate.IsBanned(id)) | ||
10685 | estate.RemoveBan(id); | ||
10686 | estate.AddEstateUser(id); | ||
10687 | break; | ||
10688 | case ScriptBaseClass.ESTATE_ACCESS_ALLOWED_AGENT_REMOVE: | ||
10689 | if (!isAccount || !estate.HasAccess(id)) return 0; | ||
10690 | estate.RemoveEstateUser(id); | ||
10691 | break; | ||
10692 | case ScriptBaseClass.ESTATE_ACCESS_ALLOWED_GROUP_ADD: | ||
10693 | if (!isGroup) return 0; | ||
10694 | if (estate.GroupAccess(id)) return 1; | ||
10695 | estate.AddEstateGroup(id); | ||
10696 | break; | ||
10697 | case ScriptBaseClass.ESTATE_ACCESS_ALLOWED_GROUP_REMOVE: | ||
10698 | if (!isGroup || !estate.GroupAccess(id)) return 0; | ||
10699 | estate.RemoveEstateGroup(id); | ||
10700 | break; | ||
10701 | case ScriptBaseClass.ESTATE_ACCESS_BANNED_AGENT_ADD: | ||
10702 | if (!isAccount) return 0; | ||
10703 | if (estate.IsBanned(id)) return 1; | ||
10704 | EstateBan ban = new EstateBan(); | ||
10705 | ban.EstateID = estate.EstateID; | ||
10706 | ban.BannedUserID = id; | ||
10707 | estate.AddBan(ban); | ||
10708 | break; | ||
10709 | case ScriptBaseClass.ESTATE_ACCESS_BANNED_AGENT_REMOVE: | ||
10710 | if (!isAccount || !estate.IsBanned(id)) return 0; | ||
10711 | estate.RemoveBan(id); | ||
10712 | break; | ||
10713 | default: return 0; | ||
10714 | } | ||
10715 | return 1; | ||
10716 | } | ||
10717 | |||
10649 | #region Not Implemented | 10718 | #region Not Implemented |
10650 | // | 10719 | // |
10651 | // Listing the unimplemented lsl functions here, please move | 10720 | // Listing the unimplemented lsl functions here, please move |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 282443b..b66537f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs | |||
@@ -242,6 +242,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
242 | void llLoopSound(string sound, double volume); | 242 | void llLoopSound(string sound, double volume); |
243 | void llLoopSoundMaster(string sound, double volume); | 243 | void llLoopSoundMaster(string sound, double volume); |
244 | void llLoopSoundSlave(string sound, double volume); | 244 | void llLoopSoundSlave(string sound, double volume); |
245 | LSL_Integer llManageEstateAccess(int action, string avatar); | ||
245 | void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset); | 246 | void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset); |
246 | void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset); | 247 | void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset); |
247 | void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset); | 248 | void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs index 176dc56..ab2c543 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs | |||
@@ -432,6 +432,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
432 | public const int REGION_FLAG_ALLOW_DIRECT_TELEPORT = 0x100000; // region allows direct teleports | 432 | public const int REGION_FLAG_ALLOW_DIRECT_TELEPORT = 0x100000; // region allows direct teleports |
433 | public const int REGION_FLAG_RESTRICT_PUSHOBJECT = 0x400000; // region restricts llPushObject | 433 | public const int REGION_FLAG_RESTRICT_PUSHOBJECT = 0x400000; // region restricts llPushObject |
434 | 434 | ||
435 | //llManageEstateAccess | ||
436 | public const int ESTATE_ACCESS_ALLOWED_AGENT_ADD = 0; | ||
437 | public const int ESTATE_ACCESS_ALLOWED_AGENT_REMOVE = 1; | ||
438 | public const int ESTATE_ACCESS_ALLOWED_GROUP_ADD = 2; | ||
439 | public const int ESTATE_ACCESS_ALLOWED_GROUP_REMOVE = 3; | ||
440 | public const int ESTATE_ACCESS_BANNED_AGENT_ADD = 4; | ||
441 | public const int ESTATE_ACCESS_BANNED_AGENT_REMOVE = 5; | ||
442 | |||
435 | public static readonly LSLInteger PAY_HIDE = new LSLInteger(-1); | 443 | public static readonly LSLInteger PAY_HIDE = new LSLInteger(-1); |
436 | public static readonly LSLInteger PAY_DEFAULT = new LSLInteger(-2); | 444 | public static readonly LSLInteger PAY_DEFAULT = new LSLInteger(-2); |
437 | 445 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 9733683..840d3a4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -1054,6 +1054,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
1054 | m_LSL_Functions.llLoopSoundSlave(sound, volume); | 1054 | m_LSL_Functions.llLoopSoundSlave(sound, volume); |
1055 | } | 1055 | } |
1056 | 1056 | ||
1057 | public LSL_Integer llManageEstateAccess(int action, string avatar) | ||
1058 | { | ||
1059 | return m_LSL_Functions.llManageEstateAccess(action, avatar); | ||
1060 | } | ||
1061 | |||
1057 | public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) | 1062 | public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) |
1058 | { | 1063 | { |
1059 | m_LSL_Functions.llMakeExplosion(particles, scale, vel, lifetime, arc, texture, offset); | 1064 | m_LSL_Functions.llMakeExplosion(particles, scale, vel, lifetime, arc, texture, offset); |
diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs index daf8c3a..41d5a7a 100644 --- a/OpenSim/Services/HypergridService/HGInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGInventoryService.cs | |||
@@ -319,13 +319,14 @@ namespace OpenSim.Services.HypergridService | |||
319 | public override InventoryItemBase GetItem(InventoryItemBase item) | 319 | public override InventoryItemBase GetItem(InventoryItemBase item) |
320 | { | 320 | { |
321 | InventoryItemBase it = base.GetItem(item); | 321 | InventoryItemBase it = base.GetItem(item); |
322 | if (it != null) | ||
323 | { | ||
324 | UserAccount user = m_Cache.GetUser(it.CreatorId); | ||
322 | 325 | ||
323 | UserAccount user = m_Cache.GetUser(it.CreatorId); | 326 | // Adjust the creator data |
324 | 327 | if (user != null && it != null && (it.CreatorData == null || it.CreatorData == string.Empty)) | |
325 | // Adjust the creator data | 328 | it.CreatorData = m_HomeURL + ";" + user.FirstName + " " + user.LastName; |
326 | if (user != null && it != null && (it.CreatorData == null || it.CreatorData == string.Empty)) | 329 | } |
327 | it.CreatorData = m_HomeURL + ";" + user.FirstName + " " + user.LastName; | ||
328 | |||
329 | return it; | 330 | return it; |
330 | } | 331 | } |
331 | 332 | ||