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 | |
parent | BUG FIX: change lludp hovertext utf-8 cut point. Thx djphil (diff) | |
download | opensim-SC_OLD-e243dd05193a1edcb16f52b2514c41de70ff8006.zip opensim-SC_OLD-e243dd05193a1edcb16f52b2514c41de70ff8006.tar.gz opensim-SC_OLD-e243dd05193a1edcb16f52b2514c41de70ff8006.tar.bz2 opensim-SC_OLD-e243dd05193a1edcb16f52b2514c41de70ff8006.tar.xz |
put back getAgentIP bug restricted, script owner must be a Administrator (god)
4 files changed, 25 insertions, 1 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) |
diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index 99c5fff..1d03f83 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini | |||
@@ -86,6 +86,7 @@ | |||
86 | ; Allow_osDrawPolygon = true ; no level check | 86 | ; Allow_osDrawPolygon = true ; no level check |
87 | ; Allow_osDrawRectangle = true ; no level check | 87 | ; Allow_osDrawRectangle = true ; no level check |
88 | ; Allow_osDrawText = true ; no level check | 88 | ; Allow_osDrawText = true ; no level check |
89 | ; Allow_osGetAgentIP = ---- ;restricted to Administrators (GOD) | ||
89 | Allow_osGetAgents = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER | 90 | Allow_osGetAgents = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER |
90 | Allow_osGetAvatarList = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER | 91 | Allow_osGetAvatarList = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER |
91 | ; Allow_osGetCurrentSunHour = true ; no level check | 92 | ; Allow_osGetCurrentSunHour = true ; no level check |
@@ -191,7 +192,6 @@ | |||
191 | Allow_osForceCreateLink = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER | 192 | Allow_osForceCreateLink = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER |
192 | Allow_osForceDropAttachment = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER | 193 | Allow_osForceDropAttachment = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER |
193 | Allow_osForceDropAttachmentAt = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER | 194 | Allow_osForceDropAttachmentAt = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER |
194 | Allow_osGetAgentIP = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER | ||
195 | Allow_osGetLinkPrimitiveParams = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER | 195 | Allow_osGetLinkPrimitiveParams = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER |
196 | Allow_osGetPhysicsEngineType = true | 196 | Allow_osGetPhysicsEngineType = true |
197 | Allow_osGetPrimitiveParams = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER | 197 | Allow_osGetPrimitiveParams = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER |