diff options
Diffstat (limited to 'OpenSim')
3 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index a1fd7cd..b84065f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1097,6 +1097,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1097 | return result; | 1097 | return result; |
1098 | } | 1098 | } |
1099 | 1099 | ||
1100 | public string osGetAgentIP(string agent) | ||
1101 | { | ||
1102 | CheckThreatLevel(); // user god is the restriction | ||
1103 | if(!(World.Permissions.IsGod(m_host.OwnerID))) | ||
1104 | return ""; | ||
1105 | |||
1106 | UUID avatarID = (UUID)agent; | ||
1107 | |||
1108 | m_host.AddScriptLPS(1); | ||
1109 | if (World.Entities.ContainsKey((UUID)agent) && World.Entities[avatarID] is ScenePresence) | ||
1110 | { | ||
1111 | ScenePresence target = (ScenePresence)World.Entities[avatarID]; | ||
1112 | return target.ControllingClient.RemoteEndPoint.Address.ToString(); | ||
1113 | } | ||
1114 | |||
1115 | // fall through case, just return nothing | ||
1116 | return ""; | ||
1117 | } | ||
1100 | // Adam's super super custom animation functions | 1118 | // Adam's super super custom animation functions |
1101 | public void osAvatarPlayAnimation(string avatar, string animation) | 1119 | public void osAvatarPlayAnimation(string avatar, string animation) |
1102 | { | 1120 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 6be3c3f..8f863af 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -145,6 +145,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
145 | 145 | ||
146 | // Avatar Info Commands | 146 | // Avatar Info Commands |
147 | LSL_List osGetAgents(); | 147 | LSL_List osGetAgents(); |
148 | string osGetAgentIP(string agent); | ||
148 | 149 | ||
149 | // Teleport commands | 150 | // Teleport commands |
150 | void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | 151 | void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index f5d2a3a..42e7bfb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -282,6 +282,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
282 | return m_OSSL_Functions.osGetAgents(); | 282 | return m_OSSL_Functions.osGetAgents(); |
283 | } | 283 | } |
284 | 284 | ||
285 | public string osGetAgentIP(string agent) | ||
286 | { | ||
287 | return m_OSSL_Functions.osGetAgentIP(agent); | ||
288 | } | ||
289 | |||
285 | // Animation Functions | 290 | // Animation Functions |
286 | 291 | ||
287 | public void osAvatarPlayAnimation(string avatar, string animation) | 292 | public void osAvatarPlayAnimation(string avatar, string animation) |