mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
put back getAgentIP bug restricted, script owner must be a Administrator (god)
This commit is contained in:
@@ -1097,6 +1097,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return result;
|
||||
}
|
||||
|
||||
public string osGetAgentIP(string agent)
|
||||
{
|
||||
CheckThreatLevel(); // user god is the restriction
|
||||
if(!(World.Permissions.IsGod(m_host.OwnerID)))
|
||||
return "";
|
||||
|
||||
UUID avatarID = (UUID)agent;
|
||||
|
||||
m_host.AddScriptLPS(1);
|
||||
if (World.Entities.ContainsKey((UUID)agent) && World.Entities[avatarID] is ScenePresence)
|
||||
{
|
||||
ScenePresence target = (ScenePresence)World.Entities[avatarID];
|
||||
return target.ControllingClient.RemoteEndPoint.Address.ToString();
|
||||
}
|
||||
|
||||
// fall through case, just return nothing
|
||||
return "";
|
||||
}
|
||||
// Adam's super super custom animation functions
|
||||
public void osAvatarPlayAnimation(string avatar, string animation)
|
||||
{
|
||||
|
||||
@@ -145,6 +145,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
|
||||
// Avatar Info Commands
|
||||
LSL_List osGetAgents();
|
||||
string osGetAgentIP(string agent);
|
||||
|
||||
// Teleport commands
|
||||
void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
|
||||
|
||||
@@ -282,6 +282,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
return m_OSSL_Functions.osGetAgents();
|
||||
}
|
||||
|
||||
public string osGetAgentIP(string agent)
|
||||
{
|
||||
return m_OSSL_Functions.osGetAgentIP(agent);
|
||||
}
|
||||
|
||||
// Animation Functions
|
||||
|
||||
public void osAvatarPlayAnimation(string avatar, string animation)
|
||||
|
||||
Reference in New Issue
Block a user