Implement XMLRPCAdmin command admin_teleport_agent.

This allows someone with access to this command on the XMLRPCAdmin interface to teleport an avatar to an arbitrary region and/or position.
This commit is contained in:
Justin Clark-Casey (justincc)
2011-12-07 17:31:57 +00:00
parent a8ed185c00
commit 415b7b7ec4
5 changed files with 157 additions and 5 deletions

View File

@@ -545,6 +545,23 @@ namespace OpenSim.Region.Framework.Scenes
return false;
}
public bool TryGetRootScenePresence(UUID avatarId, out ScenePresence avatar)
{
lock (m_localScenes)
{
foreach (Scene scene in m_localScenes)
{
avatar = scene.GetScenePresence(avatarId);
if (avatar != null && !avatar.IsChildAgent)
return true;
}
}
avatar = null;
return false;
}
public bool TryGetAvatarsScene(UUID avatarId, out Scene scene)
{
ScenePresence avatar = null;
@@ -590,6 +607,22 @@ namespace OpenSim.Region.Framework.Scenes
return false;
}
public bool TryGetRootScenePresenceByName(string firstName, string lastName, out ScenePresence sp)
{
lock (m_localScenes)
{
foreach (Scene scene in m_localScenes)
{
sp = scene.GetScenePresence(firstName, lastName);
if (sp != null && !sp.IsChildAgent)
return true;
}
}
sp = null;
return false;
}
public void ForEachScene(Action<Scene> action)
{
lock (m_localScenes)