aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorMelanie2010-03-30 21:34:27 +0100
committerMelanie2010-03-30 21:34:27 +0100
commit5693870fe26fae35a28f2d5103780434f4f40e57 (patch)
tree0e070fb6f11ab8763ac4f1f9a851a0061101d4d6 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
parentminor: commented out code removal (diff)
downloadopensim-SC-5693870fe26fae35a28f2d5103780434f4f40e57.zip
opensim-SC-5693870fe26fae35a28f2d5103780434f4f40e57.tar.gz
opensim-SC-5693870fe26fae35a28f2d5103780434f4f40e57.tar.bz2
opensim-SC-5693870fe26fae35a28f2d5103780434f4f40e57.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs20
1 files changed, 11 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 845834e..9474bab 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -697,10 +697,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
697 CheckThreatLevel(ThreatLevel.None, "osGetAgents"); 697 CheckThreatLevel(ThreatLevel.None, "osGetAgents");
698 698
699 LSL_List result = new LSL_List(); 699 LSL_List result = new LSL_List();
700 foreach (ScenePresence avatar in World.GetAvatars()) 700 World.ForEachScenePresence(delegate(ScenePresence sp)
701 { 701 {
702 result.Add(avatar.Name); 702 if (!sp.IsChildAgent)
703 } 703 result.Add(sp.Name);
704 });
704 return result; 705 return result;
705 } 706 }
706 707
@@ -1989,19 +1990,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1989 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); 1990 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
1990 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID)) 1991 if (World.Permissions.CanRunConsoleCommand(m_host.OwnerID))
1991 { 1992 {
1992 foreach (ScenePresence presence in World.GetAvatars()) 1993 World.ForEachScenePresence(delegate(ScenePresence sp)
1993 { 1994 {
1994 if ((presence.Firstname == FirstName) && 1995 if (!sp.IsChildAgent &&
1995 presence.Lastname == SurName) 1996 sp.Firstname == FirstName &&
1997 sp.Lastname == SurName)
1996 { 1998 {
1997 // kick client... 1999 // kick client...
1998 if (alert != null) 2000 if (alert != null)
1999 presence.ControllingClient.Kick(alert); 2001 sp.ControllingClient.Kick(alert);
2000 2002
2001 // ...and close on our side 2003 // ...and close on our side
2002 presence.Scene.IncomingCloseAgent(presence.UUID); 2004 sp.Scene.IncomingCloseAgent(sp.UUID);
2003 } 2005 }
2004 } 2006 });
2005 } 2007 }
2006 } 2008 }
2007 2009