aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs29
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs6
-rw-r--r--prebuild.xml1
4 files changed, 39 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 7834a83..e008ff4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -30,6 +30,7 @@ using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Runtime.Remoting.Lifetime; 31using System.Runtime.Remoting.Lifetime;
32using System.Text; 32using System.Text;
33using System.Net;
33using OpenMetaverse; 34using OpenMetaverse;
34using Nini.Config; 35using Nini.Config;
35using OpenSim; 36using OpenSim;
@@ -548,6 +549,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
548 osTeleportAgent(agent, World.RegionInfo.RegionName, position, lookat); 549 osTeleportAgent(agent, World.RegionInfo.RegionName, position, lookat);
549 } 550 }
550 551
552 // Functions that get information from the agent itself.
553 //
554 // osGetAgentIP - this is used to determine the IP address of
555 //the client. This is needed to help configure other in world
556 //resources based on the IP address of the clients connected.
557 //I think High is a good risk level for this, as it is an
558 //information leak.
559 public string osGetAgentIP(string agent)
560 {
561 CheckThreatLevel(ThreatLevel.High, "osGetAgentIP");
562
563 UUID avatarID = (UUID)agent;
564
565 m_host.AddScriptLPS(1);
566 if (World.Entities.ContainsKey((UUID)agent) && World.Entities[avatarID] is ScenePresence)
567 {
568 ScenePresence target = (ScenePresence)World.Entities[avatarID];
569 EndPoint ep = target.ControllingClient.GetClientInfo().userEP;
570 if (ep is IPEndPoint)
571 {
572 IPEndPoint ip = (IPEndPoint)ep;
573 return ip.Address.ToString();
574 }
575 }
576 // fall through case, just return nothing
577 return "";
578 }
579
551 // Adam's super super custom animation functions 580 // Adam's super super custom animation functions
552 public void osAvatarPlayAnimation(string avatar, string animation) 581 public void osAvatarPlayAnimation(string avatar, string animation)
553 { 582 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index 1150d76..c3c5cec 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -67,6 +67,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
67 void osSetParcelMediaURL(string url); 67 void osSetParcelMediaURL(string url);
68 void osSetPrimFloatOnWater(int floatYN); 68 void osSetPrimFloatOnWater(int floatYN);
69 69
70 // Avatar Info Commands
71 string osGetAgentIP(string agent);
72
70 // Teleport commands 73 // Teleport commands
71 void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); 74 void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
72 void osTeleportAgent(string agent, uint regionX, uint regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); 75 void osTeleportAgent(string agent, uint regionX, uint regionY, 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 6ba8b20..d8b9f1f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -143,6 +143,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
143 m_OSSL_Functions.osTeleportAgent(agent, position, lookat); 143 m_OSSL_Functions.osTeleportAgent(agent, position, lookat);
144 } 144 }
145 145
146 // Avatar info functions
147 public string osGetAgentIP(string agent)
148 {
149 return m_OSSL_Functions.osGetAgentIP(agent);
150 }
151
146 // Animation Functions 152 // Animation Functions
147 153
148 public void osAvatarPlayAnimation(string avatar, string animation) 154 public void osAvatarPlayAnimation(string avatar, string animation)
diff --git a/prebuild.xml b/prebuild.xml
index 2531e0b..85e429d 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -1895,6 +1895,7 @@
1895 <ReferencePath>../../../../bin/</ReferencePath> 1895 <ReferencePath>../../../../bin/</ReferencePath>
1896 <Reference name="System"/> 1896 <Reference name="System"/>
1897 <Reference name="System.Data"/> 1897 <Reference name="System.Data"/>
1898 <Reference name="System.Net"/>
1898 <Reference name="System.Web"/> 1899 <Reference name="System.Web"/>
1899 <Reference name="System.Xml"/> 1900 <Reference name="System.Xml"/>
1900 <Reference name="OpenMetaverseTypes.dll"/> 1901 <Reference name="OpenMetaverseTypes.dll"/>