aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-06-30 22:04:56 +0100
committerUbitUmarov2017-06-30 22:04:56 +0100
commit6b0a3e981cc06e7935960a5a806222a2aa2126d9 (patch)
tree868b2ffbe1b0e683c71462ebe79558c6c23fd31b /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parentupdate ode.dll (windoes only. need bins for others :( ) (diff)
downloadopensim-SC-6b0a3e981cc06e7935960a5a806222a2aa2126d9.zip
opensim-SC-6b0a3e981cc06e7935960a5a806222a2aa2126d9.tar.gz
opensim-SC-6b0a3e981cc06e7935960a5a806222a2aa2126d9.tar.bz2
opensim-SC-6b0a3e981cc06e7935960a5a806222a2aa2126d9.tar.xz
put osGetAgentIP() in threat control with level Severe so it can be disabled even for inworld administrators as needed on some grids. rearrage the osslEnable.ini file segregating the funtions only listed for information
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs16
1 files changed, 5 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index b84065f..1139579 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -452,7 +452,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
452 } 452 }
453 } 453 }
454 454
455
456 if (!m_FunctionPerms[function].AllowedCreators.Contains(m_item.CreatorID)) 455 if (!m_FunctionPerms[function].AllowedCreators.Contains(m_item.CreatorID))
457 return( 456 return(
458 String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.", 457 String.Format("{0} permission denied. Script creator is not in the list of users allowed to execute this function and prim owner also has no permission.",
@@ -1099,8 +1098,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1099 1098
1100 public string osGetAgentIP(string agent) 1099 public string osGetAgentIP(string agent)
1101 { 1100 {
1102 CheckThreatLevel(); // user god is the restriction 1101 CheckThreatLevel(ThreatLevel.Severe, "osGetAgentIP");
1103 if(!(World.Permissions.IsGod(m_host.OwnerID))) 1102 if(!(World.Permissions.IsGod(m_host.OwnerID))) // user god always needed
1104 return ""; 1103 return "";
1105 1104
1106 UUID avatarID = (UUID)agent; 1105 UUID avatarID = (UUID)agent;
@@ -1115,6 +1114,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1115 // fall through case, just return nothing 1114 // fall through case, just return nothing
1116 return ""; 1115 return "";
1117 } 1116 }
1117
1118 // Adam's super super custom animation functions 1118 // Adam's super super custom animation functions
1119 public void osAvatarPlayAnimation(string avatar, string animation) 1119 public void osAvatarPlayAnimation(string avatar, string animation)
1120 { 1120 {
@@ -1131,13 +1131,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1131 if(!UUID.TryParse(avatar, out avatarID)) 1131 if(!UUID.TryParse(avatar, out avatarID))
1132 return; 1132 return;
1133 1133
1134 if(!World.Entities.ContainsKey(avatarID)) 1134 ScenePresence target = World.GetScenePresence(avatarID);
1135 return;
1136
1137 ScenePresence target = null;
1138 if ((World.Entities[avatarID] is ScenePresence))
1139 target = (ScenePresence)World.Entities[avatarID];
1140
1141 if (target == null) 1135 if (target == null)
1142 return; 1136 return;
1143 1137
@@ -1417,7 +1411,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1417 1411
1418 public LSL_Vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize) 1412 public LSL_Vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize)
1419 { 1413 {
1420 CheckThreatLevel(ThreatLevel.VeryLow, "osGetDrawStringSize"); 1414 CheckThreatLevel();
1421 m_host.AddScriptLPS(1); 1415 m_host.AddScriptLPS(1);
1422 1416
1423 LSL_Vector vec = new LSL_Vector(0,0,0); 1417 LSL_Vector vec = new LSL_Vector(0,0,0);