aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorMelanie2011-10-27 18:14:38 +0100
committerMelanie2011-10-27 18:14:38 +0100
commitb975cbcbed71b12898052395fbc83a5880273190 (patch)
treef149288740af5227a865783a51f566bef537721e /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parentMerge branch 'master' into bigmerge (diff)
parentRemoved use of 'is' operator and casting to find the root ScenePresence in Me... (diff)
downloadopensim-SC-b975cbcbed71b12898052395fbc83a5880273190.zip
opensim-SC-b975cbcbed71b12898052395fbc83a5880273190.tar.gz
opensim-SC-b975cbcbed71b12898052395fbc83a5880273190.tar.bz2
opensim-SC-b975cbcbed71b12898052395fbc83a5880273190.tar.xz
Merge branch 'master' into bigmerge
Conflicts: OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs24
1 files changed, 9 insertions, 15 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index ab0eec9..dc22017 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -882,10 +882,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
882 CheckThreatLevel(ThreatLevel.None, "osGetAgents"); 882 CheckThreatLevel(ThreatLevel.None, "osGetAgents");
883 883
884 LSL_List result = new LSL_List(); 884 LSL_List result = new LSL_List();
885 World.ForEachScenePresence(delegate(ScenePresence sp) 885 World.ForEachRootScenePresence(delegate(ScenePresence sp)
886 { 886 {
887 if (!sp.IsChildAgent) 887 result.Add(new LSL_String(sp.Name));
888 result.Add(new LSL_String(sp.Name));
889 }); 888 });
890 return result; 889 return result;
891 } 890 }
@@ -2590,11 +2589,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2590 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); 2589 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
2591 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) 2590 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
2592 { 2591 {
2593 World.ForEachScenePresence(delegate(ScenePresence sp) 2592 World.ForEachRootScenePresence(delegate(ScenePresence sp)
2594 { 2593 {
2595 if (!sp.IsChildAgent && 2594 if (sp.Firstname == FirstName && sp.Lastname == SurName)
2596 sp.Firstname == FirstName &&
2597 sp.Lastname == SurName)
2598 { 2595 {
2599 // kick client... 2596 // kick client...
2600 if (alert != null) 2597 if (alert != null)
@@ -2726,17 +2723,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2726 CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); 2723 CheckThreatLevel(ThreatLevel.None, "osGetAvatarList");
2727 2724
2728 LSL_List result = new LSL_List(); 2725 LSL_List result = new LSL_List();
2729 World.ForEachScenePresence(delegate (ScenePresence avatar) 2726 World.ForEachRootScenePresence(delegate (ScenePresence avatar)
2730 { 2727 {
2731 if (avatar != null && avatar.UUID != m_host.OwnerID) 2728 if (avatar != null && avatar.UUID != m_host.OwnerID)
2732 { 2729 {
2733 if (avatar.IsChildAgent == false) 2730 result.Add(new LSL_String(avatar.UUID.ToString()));
2734 { 2731 OpenMetaverse.Vector3 ap = avatar.AbsolutePosition;
2735 result.Add(new LSL_String(avatar.UUID.ToString())); 2732 result.Add(new LSL_Vector(ap.X, ap.Y, ap.Z));
2736 OpenMetaverse.Vector3 ap = avatar.AbsolutePosition; 2733 result.Add(new LSL_String(avatar.Name));
2737 result.Add(new LSL_Vector(ap.X, ap.Y, ap.Z));
2738 result.Add(new LSL_String(avatar.Name));
2739 }
2740 } 2734 }
2741 }); 2735 });
2742 2736