diff options
author | UbitUmarov | 2017-06-28 02:19:27 +0100 |
---|---|---|
committer | UbitUmarov | 2017-06-28 02:19:27 +0100 |
commit | e243dd05193a1edcb16f52b2514c41de70ff8006 (patch) | |
tree | 2d3a5c236379d9a9dadeace01713acd24150b1ae /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | BUG FIX: change lludp hovertext utf-8 cut point. Thx djphil (diff) | |
download | opensim-SC-e243dd05193a1edcb16f52b2514c41de70ff8006.zip opensim-SC-e243dd05193a1edcb16f52b2514c41de70ff8006.tar.gz opensim-SC-e243dd05193a1edcb16f52b2514c41de70ff8006.tar.bz2 opensim-SC-e243dd05193a1edcb16f52b2514c41de70ff8006.tar.xz |
put back getAgentIP bug restricted, script owner must be a Administrator (god)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 18 |
1 files changed, 18 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 | { |