OsGetAgentIP

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Change See Also)
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
string OsGetAgentIP(key uuid);
+
{{osslfunc
 
+
|threat_level=Severe
Requires: key <uuid> of agent to get IP address for.
+
|permissions=true
 
+
|delay=0
Returns: string representing the IP address returned.
+
|function_syntax=string osGetAgentIP(key uuid);
 
+
|description=Requires: ''key uuid'' of agent to get IP address for.
Threat Level: High
+
Returns: string representing the IP address returned.<br>
 
+
Possible Exceptions thrown:
Exceptions thrown:
+
System.Exception: OSSL Runtime Error: osGetAgentIP permission denied.  Allowed threat level is VeryLow but function threat level is High.
  System.Exception: OSSL Runtime Error: osGetAgentIP permission denied.  Allowed threat level is VeryLow but function threat level is High.
+
 
+
Example Usage:
+
//
+
// Example of osGetAgentIP
+
//
+
default
+
{
+
state_entry()
+
{
+
  // Demo-Script
+
}
+
  touch_start(integer total_number)
+
  {
+
  llSay (0, "Your IP is : "+ osGetAgentIP(llDetectedKey(0)));
+
  }
+
}
+
 
+
 
Notes:
 
Notes:
Unknown if this function requires a valid *Detect* event such as touch or collision.
+
Unknown if this function requires a valid ''Detect'' event such as touch or collision.<br>
 
+
Unknown what is returned for IPv6.<br>
Unknown what is returned for IPv6.
+
'''osGetAgentIP''' is always restricted to Administrators
 +
|ossl_example=<source lang="lsl">
 +
//
 +
// osGetAgentIP Script Example
 +
//
  
 +
default
 +
{
 +
    state_entry()
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Touch to see osGetAgentIP usage.");
 +
    }
  
[[Category:OSSL]]
+
    touch_start(integer number)
 +
    {
 +
        llSay(PUBLIC_CHANNEL, "Your IP is : " + osGetAgentIP(llDetectedKey(0)));
 +
    }
 +
}
 +
</source>
 +
|additional_info=
 +
}}
 +
== See Also ==
 +
* [[osGetAgentIP]]
 +
* [[osGetAgentCountry]]
 +
* [[osDetectedCountry]]

Latest revision as of 19:46, 5 December 2020

string osGetAgentIP(key uuid);
Requires: key uuid of agent to get IP address for.

Returns: string representing the IP address returned.
Possible Exceptions thrown:

System.Exception: OSSL Runtime Error: osGetAgentIP permission denied.  Allowed threat level is VeryLow but function threat level is High.

Notes: Unknown if this function requires a valid Detect event such as touch or collision.
Unknown what is returned for IPv6.
osGetAgentIP is always restricted to Administrators

Threat Level Severe
Permissions Use of this function is always allowed by default
Extra Delay 0 seconds
Example(s)
//
// osGetAgentIP Script Example
//
 
default
{
    state_entry()
    {
        llSay(PUBLIC_CHANNEL, "Touch to see osGetAgentIP usage.");
    }
 
    touch_start(integer number) 
    {
        llSay(PUBLIC_CHANNEL, "Your IP is : " + osGetAgentIP(llDetectedKey(0)));
    }
}


[edit] See Also

General
About This Wiki