diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 398 |
1 files changed, 202 insertions, 196 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 48f9d0b..5f27080 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -145,8 +145,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
145 | internal static TimeZoneInfo PSTTimeZone = null; | 145 | internal static TimeZoneInfo PSTTimeZone = null; |
146 | internal static bool m_PermissionErrortoOwner = false; | 146 | internal static bool m_PermissionErrortoOwner = false; |
147 | internal static ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow; | 147 | internal static ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow; |
148 | internal static float m_ScriptDelayFactor = 1.0f; | 148 | //// internal static float m_ScriptDelayFactor = 1.0f; |
149 | internal static float m_ScriptDistanceFactor = 1.0f; | 149 | //// internal static float m_ScriptDistanceFactor = 1.0f; |
150 | internal static IConfig m_osslconfig; | 150 | internal static IConfig m_osslconfig; |
151 | 151 | ||
152 | internal static ConcurrentDictionary<string, FunctionPerms> m_FunctionPerms = new ConcurrentDictionary<string, FunctionPerms>(); | 152 | internal static ConcurrentDictionary<string, FunctionPerms> m_FunctionPerms = new ConcurrentDictionary<string, FunctionPerms>(); |
@@ -186,8 +186,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
186 | 186 | ||
187 | m_PermissionErrortoOwner = m_osslconfig.GetBoolean("PermissionErrorToOwner", m_PermissionErrortoOwner); | 187 | m_PermissionErrortoOwner = m_osslconfig.GetBoolean("PermissionErrorToOwner", m_PermissionErrortoOwner); |
188 | 188 | ||
189 | m_ScriptDelayFactor = m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f); | 189 | //// m_ScriptDelayFactor = m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f); |
190 | m_ScriptDistanceFactor = m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f); | 190 | //// m_ScriptDistanceFactor = m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f); |
191 | 191 | ||
192 | string risk = m_osslconfig.GetString("OSFunctionThreatLevel", "VeryLow"); | 192 | string risk = m_osslconfig.GetString("OSFunctionThreatLevel", "VeryLow"); |
193 | switch (risk) | 193 | switch (risk) |
@@ -264,7 +264,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
264 | 264 | ||
265 | internal void OSSLError(string msg) | 265 | internal void OSSLError(string msg) |
266 | { | 266 | { |
267 | throw new ScriptException("OSSL Runtime Error: " + msg); | 267 | // if (m_debuggerSafe) |
268 | // OSSLShoutError(msg); | ||
269 | // else | ||
270 | { | ||
271 | throw new ScriptException("OSSL Runtime Error: " + msg); | ||
272 | } | ||
268 | } | 273 | } |
269 | 274 | ||
270 | /// <summary> | 275 | /// <summary> |
@@ -286,7 +291,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
286 | // | 291 | // |
287 | //Dumps an error message on the debug console. | 292 | //Dumps an error message on the debug console. |
288 | // | 293 | // |
289 | |||
290 | internal void OSSLShoutError(string message) | 294 | internal void OSSLShoutError(string message) |
291 | { | 295 | { |
292 | if (message.Length > 1023) | 296 | if (message.Length > 1023) |
@@ -302,17 +306,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
302 | 306 | ||
303 | // Returns if OSSL is enabled. Throws a script exception if OSSL is not allowed.. | 307 | // Returns if OSSL is enabled. Throws a script exception if OSSL is not allowed.. |
304 | // for safe funtions always active | 308 | // for safe funtions always active |
305 | public void CheckThreatLevel() | 309 | //// public void CheckThreatLevel() |
306 | { | 310 | //// { |
307 | m_host.AddScriptLPS(1); | 311 | //// m_host.AddScriptLPS(1); |
308 | if (!m_OSFunctionsEnabled) | 312 | //// if (!m_OSFunctionsEnabled) |
309 | OSSLError("permission denied. All unsafe OSSL funtions disabled"); // throws | 313 | //// OSSLError("permission denied. All unsafe OSSL funtions disabled"); // throws |
310 | } | 314 | //// } |
311 | 315 | ||
312 | // Returns if the function is allowed. Throws a script exception if not allowed. | 316 | // Returns if the function is allowed. Throws a script exception if not allowed. |
313 | public void CheckThreatLevel(ThreatLevel level, string function) | 317 | public void CheckThreatLevel(ThreatLevel level, string function) |
314 | { | 318 | { |
315 | m_host.AddScriptLPS(1); | 319 | //// m_host.AddScriptLPS(1); |
316 | if (!m_OSFunctionsEnabled) | 320 | if (!m_OSFunctionsEnabled) |
317 | { | 321 | { |
318 | if (m_PermissionErrortoOwner) | 322 | if (m_PermissionErrortoOwner) |
@@ -585,16 +589,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
585 | OSSLShoutError(string.Format("Use of function {0} is deprecated. Use {1} instead.", function, replacement)); | 589 | OSSLShoutError(string.Format("Use of function {0} is deprecated. Use {1} instead.", function, replacement)); |
586 | } | 590 | } |
587 | 591 | ||
588 | protected void ScriptSleep(int delay) | 592 | //// protected void ScriptSleep(int delay) |
589 | { | 593 | //// { |
590 | delay = (int)(delay * m_ScriptDelayFactor); | 594 | //// delay = (int)(delay * m_ScriptDelayFactor); |
591 | if (delay < 10) | 595 | //// if (delay < 10) |
592 | return; | 596 | //// return; |
593 | if(m_item != null) | 597 | //// if(m_item != null) |
594 | m_ScriptEngine.SleepScript(m_item.ItemID, delay); | 598 | //// m_ScriptEngine.SleepScript(m_item.ItemID, delay); |
595 | else | 599 | //// else |
596 | Thread.Sleep(delay); | 600 | //// Thread.Sleep(delay); |
597 | } | 601 | //// } |
598 | 602 | ||
599 | public LSL_Integer osSetTerrainHeight(int x, int y, double val) | 603 | public LSL_Integer osSetTerrainHeight(int x, int y, double val) |
600 | { | 604 | { |
@@ -629,13 +633,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
629 | 633 | ||
630 | public LSL_Float osGetTerrainHeight(int x, int y) | 634 | public LSL_Float osGetTerrainHeight(int x, int y) |
631 | { | 635 | { |
632 | CheckThreatLevel(); | 636 | //// CheckThreatLevel(); |
633 | return GetTerrainHeight(x, y); | 637 | return GetTerrainHeight(x, y); |
634 | } | 638 | } |
635 | 639 | ||
636 | public LSL_Float osTerrainGetHeight(int x, int y) | 640 | public LSL_Float osTerrainGetHeight(int x, int y) |
637 | { | 641 | { |
638 | CheckThreatLevel(); | 642 | //// CheckThreatLevel(); |
639 | OSSLDeprecated("osTerrainGetHeight", "osGetTerrainHeight"); | 643 | OSSLDeprecated("osTerrainGetHeight", "osGetTerrainHeight"); |
640 | return GetTerrainHeight(x, y); | 644 | return GetTerrainHeight(x, y); |
641 | } | 645 | } |
@@ -797,7 +801,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
797 | public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, | 801 | public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, |
798 | int timer) | 802 | int timer) |
799 | { | 803 | { |
800 | CheckThreatLevel(ThreatLevel.VeryHigh, "osSetDynamicTextureURL"); | 804 | //// CheckThreatLevel(ThreatLevel.VeryHigh, "osSetDynamicTextureURL"); |
801 | 805 | ||
802 | if (dynamicID == String.Empty) | 806 | if (dynamicID == String.Empty) |
803 | { | 807 | { |
@@ -818,7 +822,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
818 | public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | 822 | public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, |
819 | int timer, int alpha) | 823 | int timer, int alpha) |
820 | { | 824 | { |
821 | CheckThreatLevel(ThreatLevel.VeryHigh, "osSetDynamicTextureURLBlend"); | 825 | //// CheckThreatLevel(ThreatLevel.VeryHigh, "osSetDynamicTextureURLBlend"); |
822 | 826 | ||
823 | if (dynamicID == String.Empty) | 827 | if (dynamicID == String.Empty) |
824 | { | 828 | { |
@@ -839,7 +843,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
839 | public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, | 843 | public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, |
840 | bool blend, int disp, int timer, int alpha, int face) | 844 | bool blend, int disp, int timer, int alpha, int face) |
841 | { | 845 | { |
842 | CheckThreatLevel(ThreatLevel.VeryHigh, "osSetDynamicTextureURLBlendFace"); | 846 | //// CheckThreatLevel(ThreatLevel.VeryHigh, "osSetDynamicTextureURLBlendFace"); |
843 | 847 | ||
844 | if (dynamicID == String.Empty) | 848 | if (dynamicID == String.Empty) |
845 | { | 849 | { |
@@ -866,7 +870,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
866 | public string osSetDynamicTextureDataFace(string dynamicID, string contentType, string data, string extraParams, | 870 | public string osSetDynamicTextureDataFace(string dynamicID, string contentType, string data, string extraParams, |
867 | int timer, int face) | 871 | int timer, int face) |
868 | { | 872 | { |
869 | CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureData"); | 873 | //// CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureData"); |
870 | 874 | ||
871 | if (dynamicID == String.Empty) | 875 | if (dynamicID == String.Empty) |
872 | { | 876 | { |
@@ -895,7 +899,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
895 | public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, | 899 | public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, |
896 | int timer, int alpha) | 900 | int timer, int alpha) |
897 | { | 901 | { |
898 | CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlend"); | 902 | //// CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlend"); |
899 | 903 | ||
900 | if (dynamicID == String.Empty) | 904 | if (dynamicID == String.Empty) |
901 | { | 905 | { |
@@ -923,7 +927,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
923 | public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, | 927 | public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, |
924 | bool blend, int disp, int timer, int alpha, int face) | 928 | bool blend, int disp, int timer, int alpha, int face) |
925 | { | 929 | { |
926 | CheckThreatLevel(ThreatLevel.VeryLow , "osSetDynamicTextureDataBlendFace"); | 930 | //// CheckThreatLevel(ThreatLevel.VeryLow , "osSetDynamicTextureDataBlendFace"); |
927 | 931 | ||
928 | if (dynamicID == String.Empty) | 932 | if (dynamicID == String.Empty) |
929 | { | 933 | { |
@@ -1053,7 +1057,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1053 | Vector3 pos = presence.AbsolutePosition; | 1057 | Vector3 pos = presence.AbsolutePosition; |
1054 | if(!checkAllowAgentTPbyLandOwner(agentId, pos)) | 1058 | if(!checkAllowAgentTPbyLandOwner(agentId, pos)) |
1055 | { | 1059 | { |
1056 | ScriptSleep(500); | 1060 | //// ScriptSleep(500); |
1057 | return; | 1061 | return; |
1058 | } | 1062 | } |
1059 | 1063 | ||
@@ -1062,7 +1066,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1062 | // should be faster than going to threadpool | 1066 | // should be faster than going to threadpool |
1063 | World.RequestTeleportLocation(presence.ControllingClient, regionName, position, | 1067 | World.RequestTeleportLocation(presence.ControllingClient, regionName, position, |
1064 | lookat, (uint)TPFlags.ViaLocation); | 1068 | lookat, (uint)TPFlags.ViaLocation); |
1065 | ScriptSleep(500); | 1069 | //// ScriptSleep(500); |
1066 | } | 1070 | } |
1067 | else | 1071 | else |
1068 | { | 1072 | { |
@@ -1073,7 +1077,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1073 | presence.ControllingClient, regionName, position, | 1077 | presence.ControllingClient, regionName, position, |
1074 | lookat, (uint)(TPFlags.ViaLocation | TPFlags.ViaScript)), | 1078 | lookat, (uint)(TPFlags.ViaLocation | TPFlags.ViaScript)), |
1075 | null, "OSSL_Api.TeleportAgentByRegionCoords"); | 1079 | null, "OSSL_Api.TeleportAgentByRegionCoords"); |
1076 | ScriptSleep(5000); | 1080 | //// ScriptSleep(5000); |
1077 | } | 1081 | } |
1078 | } | 1082 | } |
1079 | } | 1083 | } |
@@ -1102,7 +1106,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1102 | Vector3 pos = presence.AbsolutePosition; | 1106 | Vector3 pos = presence.AbsolutePosition; |
1103 | if(!checkAllowAgentTPbyLandOwner(agentId, pos)) | 1107 | if(!checkAllowAgentTPbyLandOwner(agentId, pos)) |
1104 | { | 1108 | { |
1105 | ScriptSleep(500); | 1109 | //// ScriptSleep(500); |
1106 | return; | 1110 | return; |
1107 | } | 1111 | } |
1108 | 1112 | ||
@@ -1112,7 +1116,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1112 | position, lookat, (uint)TPFlags.ViaLocation), | 1116 | position, lookat, (uint)TPFlags.ViaLocation), |
1113 | null, "OSSL_Api.TeleportAgentByRegionName"); | 1117 | null, "OSSL_Api.TeleportAgentByRegionName"); |
1114 | 1118 | ||
1115 | ScriptSleep(5000); | 1119 | //// ScriptSleep(5000); |
1116 | } | 1120 | } |
1117 | } | 1121 | } |
1118 | 1122 | ||
@@ -1128,34 +1132,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1128 | Vector3 pos = presence.AbsolutePosition; | 1132 | Vector3 pos = presence.AbsolutePosition; |
1129 | if(!checkAllowAgentTPbyLandOwner(agentId, pos)) | 1133 | if(!checkAllowAgentTPbyLandOwner(agentId, pos)) |
1130 | { | 1134 | { |
1131 | ScriptSleep(500); | 1135 | //// ScriptSleep(500); |
1132 | return; | 1136 | return; |
1133 | } | 1137 | } |
1134 | 1138 | ||
1135 | World.RequestTeleportLocation(presence.ControllingClient, World.RegionInfo.RegionName, position, | 1139 | World.RequestTeleportLocation(presence.ControllingClient, World.RegionInfo.RegionName, position, |
1136 | lookat, (uint)TPFlags.ViaLocation); | 1140 | lookat, (uint)TPFlags.ViaLocation); |
1137 | ScriptSleep(500); | 1141 | //// ScriptSleep(500); |
1138 | } | 1142 | } |
1139 | } | 1143 | } |
1140 | 1144 | ||
1141 | public void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) | 1145 | public void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) |
1142 | { | 1146 | { |
1143 | // Threat level None because this is what can already be done with the World Map in the viewer | 1147 | // Threat level None because this is what can already be done with the World Map in the viewer |
1144 | CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); | 1148 | //// CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); |
1145 | 1149 | ||
1146 | TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat); | 1150 | TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat); |
1147 | } | 1151 | } |
1148 | 1152 | ||
1149 | public void osTeleportOwner(int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) | 1153 | public void osTeleportOwner(int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) |
1150 | { | 1154 | { |
1151 | CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); | 1155 | //// CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); |
1152 | 1156 | ||
1153 | TeleportAgent(m_host.OwnerID.ToString(), regionGridX, regionGridY, position, lookat); | 1157 | TeleportAgent(m_host.OwnerID.ToString(), regionGridX, regionGridY, position, lookat); |
1154 | } | 1158 | } |
1155 | 1159 | ||
1156 | public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) | 1160 | public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) |
1157 | { | 1161 | { |
1158 | CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); | 1162 | //// CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); |
1159 | 1163 | ||
1160 | osTeleportAgent(m_host.OwnerID.ToString(), position, lookat); | 1164 | osTeleportAgent(m_host.OwnerID.ToString(), position, lookat); |
1161 | } | 1165 | } |
@@ -1214,7 +1218,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1214 | { | 1218 | { |
1215 | // threat level is None as we could get this information with an | 1219 | // threat level is None as we could get this information with an |
1216 | // in-world script as well, just not as efficient | 1220 | // in-world script as well, just not as efficient |
1217 | CheckThreatLevel(ThreatLevel.None, "osGetAgents"); | 1221 | //// CheckThreatLevel(ThreatLevel.None, "osGetAgents"); |
1218 | 1222 | ||
1219 | LSL_List result = new LSL_List(); | 1223 | LSL_List result = new LSL_List(); |
1220 | World.ForEachRootScenePresence(delegate(ScenePresence sp) | 1224 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
@@ -1308,7 +1312,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1308 | 1312 | ||
1309 | public string osDrawResetTransform(string drawList) | 1313 | public string osDrawResetTransform(string drawList) |
1310 | { | 1314 | { |
1311 | CheckThreatLevel(); | 1315 | //// CheckThreatLevel(); |
1312 | 1316 | ||
1313 | drawList += "ResetTransf;"; | 1317 | drawList += "ResetTransf;"; |
1314 | return drawList; | 1318 | return drawList; |
@@ -1316,7 +1320,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1316 | 1320 | ||
1317 | public string osDrawRotationTransform(string drawList, LSL_Float x) | 1321 | public string osDrawRotationTransform(string drawList, LSL_Float x) |
1318 | { | 1322 | { |
1319 | CheckThreatLevel(); | 1323 | //// CheckThreatLevel(); |
1320 | 1324 | ||
1321 | drawList += "RotTransf " + x + ";"; | 1325 | drawList += "RotTransf " + x + ";"; |
1322 | return drawList; | 1326 | return drawList; |
@@ -1324,7 +1328,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1324 | 1328 | ||
1325 | public string osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y) | 1329 | public string osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y) |
1326 | { | 1330 | { |
1327 | CheckThreatLevel(); | 1331 | //// CheckThreatLevel(); |
1328 | 1332 | ||
1329 | drawList += "ScaleTransf " + x + "," + y + ";"; | 1333 | drawList += "ScaleTransf " + x + "," + y + ";"; |
1330 | return drawList; | 1334 | return drawList; |
@@ -1332,7 +1336,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1332 | 1336 | ||
1333 | public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y) | 1337 | public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y) |
1334 | { | 1338 | { |
1335 | CheckThreatLevel(); | 1339 | //// CheckThreatLevel(); |
1336 | 1340 | ||
1337 | drawList += "TransTransf " + x + "," + y + ";"; | 1341 | drawList += "TransTransf " + x + "," + y + ";"; |
1338 | return drawList; | 1342 | return drawList; |
@@ -1340,7 +1344,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1340 | 1344 | ||
1341 | public string osMovePen(string drawList, int x, int y) | 1345 | public string osMovePen(string drawList, int x, int y) |
1342 | { | 1346 | { |
1343 | CheckThreatLevel(); | 1347 | //// CheckThreatLevel(); |
1344 | 1348 | ||
1345 | drawList += "MoveTo " + x + "," + y + ";"; | 1349 | drawList += "MoveTo " + x + "," + y + ";"; |
1346 | return drawList; | 1350 | return drawList; |
@@ -1348,7 +1352,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1348 | 1352 | ||
1349 | public string osDrawLine(string drawList, int startX, int startY, int endX, int endY) | 1353 | public string osDrawLine(string drawList, int startX, int startY, int endX, int endY) |
1350 | { | 1354 | { |
1351 | CheckThreatLevel(); | 1355 | //// CheckThreatLevel(); |
1352 | 1356 | ||
1353 | drawList += "MoveTo "+ startX+","+ startY +"; LineTo "+endX +","+endY +"; "; | 1357 | drawList += "MoveTo "+ startX+","+ startY +"; LineTo "+endX +","+endY +"; "; |
1354 | return drawList; | 1358 | return drawList; |
@@ -1356,7 +1360,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1356 | 1360 | ||
1357 | public string osDrawLine(string drawList, int endX, int endY) | 1361 | public string osDrawLine(string drawList, int endX, int endY) |
1358 | { | 1362 | { |
1359 | CheckThreatLevel(); | 1363 | //// CheckThreatLevel(); |
1360 | 1364 | ||
1361 | drawList += "LineTo " + endX + "," + endY + "; "; | 1365 | drawList += "LineTo " + endX + "," + endY + "; "; |
1362 | return drawList; | 1366 | return drawList; |
@@ -1364,7 +1368,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1364 | 1368 | ||
1365 | public string osDrawText(string drawList, string text) | 1369 | public string osDrawText(string drawList, string text) |
1366 | { | 1370 | { |
1367 | CheckThreatLevel(ThreatLevel.None, "osDrawText"); | 1371 | //// CheckThreatLevel(ThreatLevel.None, "osDrawText"); |
1368 | 1372 | ||
1369 | drawList += "Text " + text + "; "; | 1373 | drawList += "Text " + text + "; "; |
1370 | return drawList; | 1374 | return drawList; |
@@ -1372,7 +1376,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1372 | 1376 | ||
1373 | public string osDrawEllipse(string drawList, int width, int height) | 1377 | public string osDrawEllipse(string drawList, int width, int height) |
1374 | { | 1378 | { |
1375 | CheckThreatLevel(); | 1379 | //// CheckThreatLevel(); |
1376 | 1380 | ||
1377 | drawList += "Ellipse " + width + "," + height + "; "; | 1381 | drawList += "Ellipse " + width + "," + height + "; "; |
1378 | return drawList; | 1382 | return drawList; |
@@ -1380,7 +1384,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1380 | 1384 | ||
1381 | public string osDrawFilledEllipse(string drawList, int width, int height) | 1385 | public string osDrawFilledEllipse(string drawList, int width, int height) |
1382 | { | 1386 | { |
1383 | CheckThreatLevel(); | 1387 | //// CheckThreatLevel(); |
1384 | 1388 | ||
1385 | drawList += "FillEllipse " + width + "," + height + "; "; | 1389 | drawList += "FillEllipse " + width + "," + height + "; "; |
1386 | return drawList; | 1390 | return drawList; |
@@ -1388,7 +1392,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1388 | 1392 | ||
1389 | public string osDrawRectangle(string drawList, int width, int height) | 1393 | public string osDrawRectangle(string drawList, int width, int height) |
1390 | { | 1394 | { |
1391 | CheckThreatLevel(); | 1395 | //// CheckThreatLevel(); |
1392 | 1396 | ||
1393 | drawList += "Rectangle " + width + "," + height + "; "; | 1397 | drawList += "Rectangle " + width + "," + height + "; "; |
1394 | return drawList; | 1398 | return drawList; |
@@ -1396,7 +1400,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1396 | 1400 | ||
1397 | public string osDrawFilledRectangle(string drawList, int width, int height) | 1401 | public string osDrawFilledRectangle(string drawList, int width, int height) |
1398 | { | 1402 | { |
1399 | CheckThreatLevel(); | 1403 | //// CheckThreatLevel(); |
1400 | 1404 | ||
1401 | drawList += "FillRectangle " + width + "," + height + "; "; | 1405 | drawList += "FillRectangle " + width + "," + height + "; "; |
1402 | return drawList; | 1406 | return drawList; |
@@ -1404,7 +1408,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1404 | 1408 | ||
1405 | public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y) | 1409 | public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y) |
1406 | { | 1410 | { |
1407 | CheckThreatLevel(); | 1411 | //// CheckThreatLevel(); |
1408 | 1412 | ||
1409 | if (x.Length != y.Length || x.Length < 3) | 1413 | if (x.Length != y.Length || x.Length < 3) |
1410 | { | 1414 | { |
@@ -1421,7 +1425,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1421 | 1425 | ||
1422 | public string osDrawPolygon(string drawList, LSL_List x, LSL_List y) | 1426 | public string osDrawPolygon(string drawList, LSL_List x, LSL_List y) |
1423 | { | 1427 | { |
1424 | CheckThreatLevel(); | 1428 | //// CheckThreatLevel(); |
1425 | 1429 | ||
1426 | if (x.Length != y.Length || x.Length < 3) | 1430 | if (x.Length != y.Length || x.Length < 3) |
1427 | { | 1431 | { |
@@ -1438,7 +1442,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1438 | 1442 | ||
1439 | public string osSetFontSize(string drawList, int fontSize) | 1443 | public string osSetFontSize(string drawList, int fontSize) |
1440 | { | 1444 | { |
1441 | CheckThreatLevel(); | 1445 | //// CheckThreatLevel(); |
1442 | 1446 | ||
1443 | drawList += "FontSize "+ fontSize +"; "; | 1447 | drawList += "FontSize "+ fontSize +"; "; |
1444 | return drawList; | 1448 | return drawList; |
@@ -1446,7 +1450,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1446 | 1450 | ||
1447 | public string osSetFontName(string drawList, string fontName) | 1451 | public string osSetFontName(string drawList, string fontName) |
1448 | { | 1452 | { |
1449 | CheckThreatLevel(); | 1453 | //// CheckThreatLevel(); |
1450 | 1454 | ||
1451 | drawList += "FontName "+ fontName +"; "; | 1455 | drawList += "FontName "+ fontName +"; "; |
1452 | return drawList; | 1456 | return drawList; |
@@ -1454,7 +1458,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1454 | 1458 | ||
1455 | public string osSetPenSize(string drawList, int penSize) | 1459 | public string osSetPenSize(string drawList, int penSize) |
1456 | { | 1460 | { |
1457 | CheckThreatLevel(); | 1461 | //// CheckThreatLevel(); |
1458 | 1462 | ||
1459 | drawList += "PenSize " + penSize + "; "; | 1463 | drawList += "PenSize " + penSize + "; "; |
1460 | return drawList; | 1464 | return drawList; |
@@ -1462,7 +1466,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1462 | 1466 | ||
1463 | public string osSetPenColor(string drawList, string color) | 1467 | public string osSetPenColor(string drawList, string color) |
1464 | { | 1468 | { |
1465 | CheckThreatLevel(); | 1469 | //// CheckThreatLevel(); |
1466 | 1470 | ||
1467 | drawList += "PenColor " + color + "; "; | 1471 | drawList += "PenColor " + color + "; "; |
1468 | return drawList; | 1472 | return drawList; |
@@ -1471,7 +1475,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1471 | // Deprecated | 1475 | // Deprecated |
1472 | public string osSetPenColour(string drawList, string colour) | 1476 | public string osSetPenColour(string drawList, string colour) |
1473 | { | 1477 | { |
1474 | CheckThreatLevel(); | 1478 | //// CheckThreatLevel(); |
1475 | OSSLDeprecated("osSetPenColour", "osSetPenColor"); | 1479 | OSSLDeprecated("osSetPenColour", "osSetPenColor"); |
1476 | 1480 | ||
1477 | drawList += "PenColour " + colour + "; "; | 1481 | drawList += "PenColour " + colour + "; "; |
@@ -1480,7 +1484,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1480 | 1484 | ||
1481 | public string osSetPenCap(string drawList, string direction, string type) | 1485 | public string osSetPenCap(string drawList, string direction, string type) |
1482 | { | 1486 | { |
1483 | CheckThreatLevel(); | 1487 | //// CheckThreatLevel(); |
1484 | 1488 | ||
1485 | drawList += "PenCap " + direction + "," + type + "; "; | 1489 | drawList += "PenCap " + direction + "," + type + "; "; |
1486 | return drawList; | 1490 | return drawList; |
@@ -1488,7 +1492,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1488 | 1492 | ||
1489 | public string osDrawImage(string drawList, int width, int height, string imageUrl) | 1493 | public string osDrawImage(string drawList, int width, int height, string imageUrl) |
1490 | { | 1494 | { |
1491 | CheckThreatLevel(); | 1495 | //// CheckThreatLevel(); |
1492 | 1496 | ||
1493 | drawList +="Image " +width + "," + height+ ","+ imageUrl +"; " ; | 1497 | drawList +="Image " +width + "," + height+ ","+ imageUrl +"; " ; |
1494 | return drawList; | 1498 | return drawList; |
@@ -1496,7 +1500,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1496 | 1500 | ||
1497 | public LSL_Vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize) | 1501 | public LSL_Vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize) |
1498 | { | 1502 | { |
1499 | CheckThreatLevel(); | 1503 | //// CheckThreatLevel(); |
1500 | 1504 | ||
1501 | LSL_Vector vec = new LSL_Vector(0,0,0); | 1505 | LSL_Vector vec = new LSL_Vector(0,0,0); |
1502 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); | 1506 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); |
@@ -1538,7 +1542,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1538 | /// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param> | 1542 | /// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param> |
1539 | public void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour) | 1543 | public void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour) |
1540 | { | 1544 | { |
1541 | CheckThreatLevel(ThreatLevel.High, "osSetRegionSunSettings"); | 1545 | CheckThreatLevel(ThreatLevel.Nuisance, "osSetRegionSunSettings"); |
1542 | 1546 | ||
1543 | while (sunHour > 24.0) | 1547 | while (sunHour > 24.0) |
1544 | sunHour -= 24.0; | 1548 | sunHour -= 24.0; |
@@ -1561,7 +1565,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1561 | /// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param> | 1565 | /// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param> |
1562 | public void osSetEstateSunSettings(bool sunFixed, double sunHour) | 1566 | public void osSetEstateSunSettings(bool sunFixed, double sunHour) |
1563 | { | 1567 | { |
1564 | CheckThreatLevel(ThreatLevel.High, "osSetEstateSunSettings"); | 1568 | CheckThreatLevel(ThreatLevel.Nuisance, "osSetEstateSunSettings"); |
1565 | 1569 | ||
1566 | while (sunHour > 24.0) | 1570 | while (sunHour > 24.0) |
1567 | sunHour -= 24.0; | 1571 | sunHour -= 24.0; |
@@ -1583,7 +1587,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1583 | /// <returns></returns> | 1587 | /// <returns></returns> |
1584 | public double osGetCurrentSunHour() | 1588 | public double osGetCurrentSunHour() |
1585 | { | 1589 | { |
1586 | CheckThreatLevel(); | 1590 | //// CheckThreatLevel(); |
1587 | 1591 | ||
1588 | // Must adjust for the fact that Region Sun Settings are still LL offset | 1592 | // Must adjust for the fact that Region Sun Settings are still LL offset |
1589 | double sunHour = World.RegionInfo.RegionSettings.SunPosition - 6; | 1593 | double sunHour = World.RegionInfo.RegionSettings.SunPosition - 6; |
@@ -1600,14 +1604,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1600 | 1604 | ||
1601 | public double osSunGetParam(string param) | 1605 | public double osSunGetParam(string param) |
1602 | { | 1606 | { |
1603 | CheckThreatLevel(ThreatLevel.None, "osSunGetParam"); | 1607 | //// CheckThreatLevel(ThreatLevel.None, "osSunGetParam"); |
1604 | OSSLDeprecated("osSunGetParam", "osGetSunParam"); | 1608 | OSSLDeprecated("osSunGetParam", "osGetSunParam"); |
1605 | return GetSunParam(param); | 1609 | return GetSunParam(param); |
1606 | } | 1610 | } |
1607 | 1611 | ||
1608 | public double osGetSunParam(string param) | 1612 | public double osGetSunParam(string param) |
1609 | { | 1613 | { |
1610 | CheckThreatLevel(); | 1614 | //// CheckThreatLevel(); |
1611 | return GetSunParam(param); | 1615 | return GetSunParam(param); |
1612 | } | 1616 | } |
1613 | 1617 | ||
@@ -1626,14 +1630,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1626 | 1630 | ||
1627 | public void osSunSetParam(string param, double value) | 1631 | public void osSunSetParam(string param, double value) |
1628 | { | 1632 | { |
1629 | CheckThreatLevel(ThreatLevel.None, "osSunSetParam"); | 1633 | CheckThreatLevel(ThreatLevel.Nuisance, "osSunSetParam"); |
1630 | OSSLDeprecated("osSunSetParam", "osSetSunParam"); | 1634 | OSSLDeprecated("osSunSetParam", "osSetSunParam"); |
1631 | SetSunParam(param, value); | 1635 | SetSunParam(param, value); |
1632 | } | 1636 | } |
1633 | 1637 | ||
1634 | public void osSetSunParam(string param, double value) | 1638 | public void osSetSunParam(string param, double value) |
1635 | { | 1639 | { |
1636 | CheckThreatLevel(ThreatLevel.None, "osSetSunParam"); | 1640 | CheckThreatLevel(ThreatLevel.Nuisance, "osSetSunParam"); |
1637 | SetSunParam(param, value); | 1641 | SetSunParam(param, value); |
1638 | } | 1642 | } |
1639 | 1643 | ||
@@ -1648,7 +1652,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1648 | 1652 | ||
1649 | public string osWindActiveModelPluginName() | 1653 | public string osWindActiveModelPluginName() |
1650 | { | 1654 | { |
1651 | CheckThreatLevel(ThreatLevel.None, "osWindActiveModelPluginName"); | 1655 | //// CheckThreatLevel(ThreatLevel.None, "osWindActiveModelPluginName"); |
1652 | 1656 | ||
1653 | IWindModule module = World.RequestModuleInterface<IWindModule>(); | 1657 | IWindModule module = World.RequestModuleInterface<IWindModule>(); |
1654 | if (module != null) | 1658 | if (module != null) |
@@ -1661,7 +1665,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1661 | 1665 | ||
1662 | public void osSetWindParam(string plugin, string param, LSL_Float value) | 1666 | public void osSetWindParam(string plugin, string param, LSL_Float value) |
1663 | { | 1667 | { |
1664 | CheckThreatLevel(ThreatLevel.VeryLow, "osSetWindParam"); | 1668 | CheckThreatLevel(ThreatLevel.Nuisance, "osSetWindParam"); |
1665 | 1669 | ||
1666 | IWindModule module = World.RequestModuleInterface<IWindModule>(); | 1670 | IWindModule module = World.RequestModuleInterface<IWindModule>(); |
1667 | if (module != null) | 1671 | if (module != null) |
@@ -1676,7 +1680,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1676 | 1680 | ||
1677 | public LSL_Float osGetWindParam(string plugin, string param) | 1681 | public LSL_Float osGetWindParam(string plugin, string param) |
1678 | { | 1682 | { |
1679 | CheckThreatLevel(ThreatLevel.VeryLow, "osGetWindParam"); | 1683 | //// CheckThreatLevel(ThreatLevel.VeryLow, "osGetWindParam"); |
1680 | 1684 | ||
1681 | IWindModule module = World.RequestModuleInterface<IWindModule>(); | 1685 | IWindModule module = World.RequestModuleInterface<IWindModule>(); |
1682 | if (module != null) | 1686 | if (module != null) |
@@ -1964,7 +1968,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1964 | // that trigger engine-specific failures. | 1968 | // that trigger engine-specific failures. |
1965 | // Besides, public grid users aren't supposed to know. | 1969 | // Besides, public grid users aren't supposed to know. |
1966 | // | 1970 | // |
1967 | CheckThreatLevel(ThreatLevel.High, "osGetScriptEngineName"); | 1971 | // And yet, they get to choose the engine in their scripts. Pfffft |
1972 | //// CheckThreatLevel(ThreatLevel.High, "osGetScriptEngineName"); | ||
1968 | 1973 | ||
1969 | int scriptEngineNameIndex = 0; | 1974 | int scriptEngineNameIndex = 0; |
1970 | 1975 | ||
@@ -1990,7 +1995,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1990 | 1995 | ||
1991 | public LSL_Integer osCheckODE() | 1996 | public LSL_Integer osCheckODE() |
1992 | { | 1997 | { |
1993 | CheckThreatLevel(); | 1998 | //// CheckThreatLevel(); |
1994 | 1999 | ||
1995 | LSL_Integer ret = 0; // false | 2000 | LSL_Integer ret = 0; // false |
1996 | if (m_ScriptEngine.World.PhysicsScene != null) | 2001 | if (m_ScriptEngine.World.PhysicsScene != null) |
@@ -2015,9 +2020,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2015 | // the user does not have permission to see it. This as opposed to | 2020 | // the user does not have permission to see it. This as opposed to |
2016 | // throwing an exception. | 2021 | // throwing an exception. |
2017 | 2022 | ||
2018 | m_host.AddScriptLPS(1); | 2023 | //// m_host.AddScriptLPS(1); |
2019 | string ret = String.Empty; | 2024 | string ret = String.Empty; |
2020 | if (String.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.High, "osGetPhysicsEngineType"))) | 2025 | //// if (String.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.High, "osGetPhysicsEngineType"))) |
2021 | { | 2026 | { |
2022 | if (m_ScriptEngine.World.PhysicsScene != null) | 2027 | if (m_ScriptEngine.World.PhysicsScene != null) |
2023 | { | 2028 | { |
@@ -2033,7 +2038,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2033 | 2038 | ||
2034 | public string osGetPhysicsEngineName() | 2039 | public string osGetPhysicsEngineName() |
2035 | { | 2040 | { |
2036 | CheckThreatLevel(); | 2041 | //// CheckThreatLevel(); |
2037 | 2042 | ||
2038 | string ret = "NoEngine"; | 2043 | string ret = "NoEngine"; |
2039 | if (m_ScriptEngine.World.PhysicsScene != null) | 2044 | if (m_ScriptEngine.World.PhysicsScene != null) |
@@ -2053,7 +2058,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2053 | // require their user to know what they are doing (see script | 2058 | // require their user to know what they are doing (see script |
2054 | // kiddie) | 2059 | // kiddie) |
2055 | // | 2060 | // |
2056 | CheckThreatLevel(ThreatLevel.High,"osGetSimulatorVersion"); | 2061 | // Or they could check in the About window. Pfffft |
2062 | //// CheckThreatLevel(ThreatLevel.High,"osGetSimulatorVersion"); | ||
2057 | 2063 | ||
2058 | return m_ScriptEngine.World.GetSimulatorVersion(); | 2064 | return m_ScriptEngine.World.GetSimulatorVersion(); |
2059 | } | 2065 | } |
@@ -2069,7 +2075,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2069 | /// <param name="message"></param> | 2075 | /// <param name="message"></param> |
2070 | public void osMessageObject(LSL_Key objectUUID, string message) | 2076 | public void osMessageObject(LSL_Key objectUUID, string message) |
2071 | { | 2077 | { |
2072 | CheckThreatLevel(ThreatLevel.Low, "osMessageObject"); | 2078 | //// CheckThreatLevel(ThreatLevel.Low, "osMessageObject"); |
2073 | 2079 | ||
2074 | UUID objUUID; | 2080 | UUID objUUID; |
2075 | if (!UUID.TryParse(objectUUID, out objUUID)) // prior to patching, a thrown exception regarding invalid GUID format would be shouted instead. | 2081 | if (!UUID.TryParse(objectUUID, out objUUID)) // prior to patching, a thrown exception regarding invalid GUID format would be shouted instead. |
@@ -2106,10 +2112,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2106 | 2112 | ||
2107 | public void osDie(LSL_Key objectUUID) | 2113 | public void osDie(LSL_Key objectUUID) |
2108 | { | 2114 | { |
2109 | // CheckThreatLevel(ThreatLevel.VeryHigh, "osDie"); | 2115 | //// CheckThreatLevel(ThreatLevel.VeryHigh, "osDie"); |
2110 | // if this is restricted to objects rezzed by this host level can be reduced | 2116 | // if this is restricted to objects rezzed by this host level can be reduced |
2111 | 2117 | ||
2112 | CheckThreatLevel(ThreatLevel.Low, "osDie"); | 2118 | //// CheckThreatLevel(ThreatLevel.Low, "osDie"); |
2113 | 2119 | ||
2114 | UUID objUUID; | 2120 | UUID objUUID; |
2115 | if (!UUID.TryParse(objectUUID, out objUUID)) | 2121 | if (!UUID.TryParse(objectUUID, out objUUID)) |
@@ -2162,7 +2168,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2162 | /// <param name="contents">The contents of the notecard.</param> | 2168 | /// <param name="contents">The contents of the notecard.</param> |
2163 | public void osMakeNotecard(string notecardName, LSL_Types.list contents) | 2169 | public void osMakeNotecard(string notecardName, LSL_Types.list contents) |
2164 | { | 2170 | { |
2165 | CheckThreatLevel(ThreatLevel.High, "osMakeNotecard"); | 2171 | //// CheckThreatLevel(ThreatLevel.High, "osMakeNotecard"); |
2166 | 2172 | ||
2167 | StringBuilder notecardData = new StringBuilder(); | 2173 | StringBuilder notecardData = new StringBuilder(); |
2168 | 2174 | ||
@@ -2347,7 +2353,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2347 | /// <returns>Notecard line</returns> | 2353 | /// <returns>Notecard line</returns> |
2348 | public string osGetNotecardLine(string name, int line) | 2354 | public string osGetNotecardLine(string name, int line) |
2349 | { | 2355 | { |
2350 | CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecardLine"); | 2356 | //// CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecardLine"); |
2351 | 2357 | ||
2352 | UUID assetID = CacheNotecard(name); | 2358 | UUID assetID = CacheNotecard(name); |
2353 | 2359 | ||
@@ -2374,7 +2380,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2374 | /// <returns>Notecard text</returns> | 2380 | /// <returns>Notecard text</returns> |
2375 | public string osGetNotecard(string name) | 2381 | public string osGetNotecard(string name) |
2376 | { | 2382 | { |
2377 | CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecard"); | 2383 | //// CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecard"); |
2378 | 2384 | ||
2379 | string text = LoadNotecard(name); | 2385 | string text = LoadNotecard(name); |
2380 | 2386 | ||
@@ -2403,7 +2409,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2403 | /// <returns></returns> | 2409 | /// <returns></returns> |
2404 | public int osGetNumberOfNotecardLines(string name) | 2410 | public int osGetNumberOfNotecardLines(string name) |
2405 | { | 2411 | { |
2406 | CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNumberOfNotecardLines"); | 2412 | //// CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNumberOfNotecardLines"); |
2407 | 2413 | ||
2408 | UUID assetID = CacheNotecard(name); | 2414 | UUID assetID = CacheNotecard(name); |
2409 | 2415 | ||
@@ -2463,7 +2469,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2463 | 2469 | ||
2464 | public string osKey2Name(string id) | 2470 | public string osKey2Name(string id) |
2465 | { | 2471 | { |
2466 | CheckThreatLevel(ThreatLevel.Low, "osKey2Name"); | 2472 | //// CheckThreatLevel(ThreatLevel.Low, "osKey2Name"); |
2467 | 2473 | ||
2468 | UUID key = new UUID(); | 2474 | UUID key = new UUID(); |
2469 | 2475 | ||
@@ -2572,7 +2578,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2572 | /// <returns></returns> | 2578 | /// <returns></returns> |
2573 | public string osGetGridNick() | 2579 | public string osGetGridNick() |
2574 | { | 2580 | { |
2575 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridNick"); | 2581 | //// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridNick"); |
2576 | 2582 | ||
2577 | string nick = String.Empty; | 2583 | string nick = String.Empty; |
2578 | IConfigSource config = m_ScriptEngine.ConfigSource; | 2584 | IConfigSource config = m_ScriptEngine.ConfigSource; |
@@ -2588,7 +2594,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2588 | 2594 | ||
2589 | public string osGetGridName() | 2595 | public string osGetGridName() |
2590 | { | 2596 | { |
2591 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridName"); | 2597 | //// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridName"); |
2592 | 2598 | ||
2593 | string name = String.Empty; | 2599 | string name = String.Empty; |
2594 | IConfigSource config = m_ScriptEngine.ConfigSource; | 2600 | IConfigSource config = m_ScriptEngine.ConfigSource; |
@@ -2604,7 +2610,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2604 | 2610 | ||
2605 | public string osGetGridLoginURI() | 2611 | public string osGetGridLoginURI() |
2606 | { | 2612 | { |
2607 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridLoginURI"); | 2613 | //// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridLoginURI"); |
2608 | 2614 | ||
2609 | string loginURI = String.Empty; | 2615 | string loginURI = String.Empty; |
2610 | IConfigSource config = m_ScriptEngine.ConfigSource; | 2616 | IConfigSource config = m_ScriptEngine.ConfigSource; |
@@ -2620,7 +2626,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2620 | 2626 | ||
2621 | public string osGetGridHomeURI() | 2627 | public string osGetGridHomeURI() |
2622 | { | 2628 | { |
2623 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI"); | 2629 | //// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI"); |
2624 | 2630 | ||
2625 | IConfigSource config = m_ScriptEngine.ConfigSource; | 2631 | IConfigSource config = m_ScriptEngine.ConfigSource; |
2626 | string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI", | 2632 | string HomeURI = Util.GetConfigVarFromSections<string>(config, "HomeURI", |
@@ -2659,7 +2665,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2659 | 2665 | ||
2660 | public string osGetGridCustom(string key) | 2666 | public string osGetGridCustom(string key) |
2661 | { | 2667 | { |
2662 | CheckThreatLevel(ThreatLevel.Moderate, "osGetGridCustom"); | 2668 | //// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridCustom"); |
2663 | 2669 | ||
2664 | string retval = String.Empty; | 2670 | string retval = String.Empty; |
2665 | IConfigSource config = m_ScriptEngine.ConfigSource; | 2671 | IConfigSource config = m_ScriptEngine.ConfigSource; |
@@ -2707,14 +2713,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2707 | 2713 | ||
2708 | public LSL_String osFormatString(string str, LSL_List strings) | 2714 | public LSL_String osFormatString(string str, LSL_List strings) |
2709 | { | 2715 | { |
2710 | CheckThreatLevel(ThreatLevel.VeryLow, "osFormatString"); | 2716 | //// CheckThreatLevel(ThreatLevel.VeryLow, "osFormatString"); |
2711 | 2717 | ||
2712 | return String.Format(str, strings.Data); | 2718 | return String.Format(str, strings.Data); |
2713 | } | 2719 | } |
2714 | 2720 | ||
2715 | public LSL_List osMatchString(string src, string pattern, int start) | 2721 | public LSL_List osMatchString(string src, string pattern, int start) |
2716 | { | 2722 | { |
2717 | CheckThreatLevel(ThreatLevel.VeryLow, "osMatchString"); | 2723 | //// CheckThreatLevel(ThreatLevel.VeryLow, "osMatchString"); |
2718 | 2724 | ||
2719 | LSL_List result = new LSL_List(); | 2725 | LSL_List result = new LSL_List(); |
2720 | 2726 | ||
@@ -2755,7 +2761,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2755 | 2761 | ||
2756 | public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start) | 2762 | public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start) |
2757 | { | 2763 | { |
2758 | CheckThreatLevel(ThreatLevel.VeryLow, "osReplaceString"); | 2764 | //// CheckThreatLevel(ThreatLevel.VeryLow, "osReplaceString"); |
2759 | 2765 | ||
2760 | // Normalize indices (if negative). | 2766 | // Normalize indices (if negative). |
2761 | // After normlaization they may still be | 2767 | // After normlaization they may still be |
@@ -2779,21 +2785,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2779 | 2785 | ||
2780 | public string osLoadedCreationDate() | 2786 | public string osLoadedCreationDate() |
2781 | { | 2787 | { |
2782 | CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate"); | 2788 | //// CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate"); |
2783 | 2789 | ||
2784 | return World.RegionInfo.RegionSettings.LoadedCreationDate; | 2790 | return World.RegionInfo.RegionSettings.LoadedCreationDate; |
2785 | } | 2791 | } |
2786 | 2792 | ||
2787 | public string osLoadedCreationTime() | 2793 | public string osLoadedCreationTime() |
2788 | { | 2794 | { |
2789 | CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationTime"); | 2795 | //// CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationTime"); |
2790 | 2796 | ||
2791 | return World.RegionInfo.RegionSettings.LoadedCreationTime; | 2797 | return World.RegionInfo.RegionSettings.LoadedCreationTime; |
2792 | } | 2798 | } |
2793 | 2799 | ||
2794 | public string osLoadedCreationID() | 2800 | public string osLoadedCreationID() |
2795 | { | 2801 | { |
2796 | CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationID"); | 2802 | //// CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationID"); |
2797 | 2803 | ||
2798 | return World.RegionInfo.RegionSettings.LoadedCreationID; | 2804 | return World.RegionInfo.RegionSettings.LoadedCreationID; |
2799 | } | 2805 | } |
@@ -2813,7 +2819,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2813 | /// <returns></returns> | 2819 | /// <returns></returns> |
2814 | public LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules) | 2820 | public LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules) |
2815 | { | 2821 | { |
2816 | CheckThreatLevel(ThreatLevel.High, "osGetLinkPrimitiveParams"); | 2822 | CheckThreatLevel(ThreatLevel.VeryLow, "osGetLinkPrimitiveParams"); |
2817 | 2823 | ||
2818 | InitLSL(); | 2824 | InitLSL(); |
2819 | // One needs to cast m_LSL_Api because we're using functions not | 2825 | // One needs to cast m_LSL_Api because we're using functions not |
@@ -2866,7 +2872,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2866 | 2872 | ||
2867 | public LSL_Integer osIsNpc(LSL_Key npc) | 2873 | public LSL_Integer osIsNpc(LSL_Key npc) |
2868 | { | 2874 | { |
2869 | CheckThreatLevel(); | 2875 | //// CheckThreatLevel(); |
2870 | 2876 | ||
2871 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2877 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
2872 | if (module != null) | 2878 | if (module != null) |
@@ -2882,7 +2888,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2882 | 2888 | ||
2883 | public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard) | 2889 | public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard) |
2884 | { | 2890 | { |
2885 | CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); | 2891 | //// CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); |
2886 | 2892 | ||
2887 | // have to get the npc module also here to set the default Not Owned | 2893 | // have to get the npc module also here to set the default Not Owned |
2888 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 2894 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
@@ -2896,7 +2902,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2896 | 2902 | ||
2897 | public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) | 2903 | public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) |
2898 | { | 2904 | { |
2899 | CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); | 2905 | //// CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); |
2900 | 2906 | ||
2901 | return NpcCreate( | 2907 | return NpcCreate( |
2902 | firstname, lastname, position, notecard, | 2908 | firstname, lastname, position, notecard, |
@@ -3039,7 +3045,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3039 | /// <returns>The asset ID of the notecard saved.</returns> | 3045 | /// <returns>The asset ID of the notecard saved.</returns> |
3040 | public LSL_Key osNpcSaveAppearance(LSL_Key npc, string notecard) | 3046 | public LSL_Key osNpcSaveAppearance(LSL_Key npc, string notecard) |
3041 | { | 3047 | { |
3042 | CheckThreatLevel(ThreatLevel.High, "osNpcSaveAppearance"); | 3048 | //// CheckThreatLevel(ThreatLevel.High, "osNpcSaveAppearance"); |
3043 | 3049 | ||
3044 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); | 3050 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); |
3045 | 3051 | ||
@@ -3060,7 +3066,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3060 | 3066 | ||
3061 | public void osNpcLoadAppearance(LSL_Key npc, string notecard) | 3067 | public void osNpcLoadAppearance(LSL_Key npc, string notecard) |
3062 | { | 3068 | { |
3063 | CheckThreatLevel(ThreatLevel.High, "osNpcLoadAppearance"); | 3069 | //// CheckThreatLevel(ThreatLevel.High, "osNpcLoadAppearance"); |
3064 | 3070 | ||
3065 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); | 3071 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); |
3066 | 3072 | ||
@@ -3091,7 +3097,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3091 | 3097 | ||
3092 | public LSL_Key osNpcGetOwner(LSL_Key npc) | 3098 | public LSL_Key osNpcGetOwner(LSL_Key npc) |
3093 | { | 3099 | { |
3094 | CheckThreatLevel(ThreatLevel.None, "osNpcGetOwner"); | 3100 | //// CheckThreatLevel(ThreatLevel.None, "osNpcGetOwner"); |
3095 | 3101 | ||
3096 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); | 3102 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); |
3097 | if (npcModule != null) | 3103 | if (npcModule != null) |
@@ -3112,7 +3118,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3112 | 3118 | ||
3113 | public LSL_Vector osNpcGetPos(LSL_Key npc) | 3119 | public LSL_Vector osNpcGetPos(LSL_Key npc) |
3114 | { | 3120 | { |
3115 | CheckThreatLevel(ThreatLevel.High, "osNpcGetPos"); | 3121 | //// CheckThreatLevel(ThreatLevel.High, "osNpcGetPos"); |
3116 | 3122 | ||
3117 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); | 3123 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); |
3118 | if (npcModule != null) | 3124 | if (npcModule != null) |
@@ -3135,7 +3141,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3135 | 3141 | ||
3136 | public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos) | 3142 | public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos) |
3137 | { | 3143 | { |
3138 | CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo"); | 3144 | //// CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo"); |
3139 | 3145 | ||
3140 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3146 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3141 | if (module != null) | 3147 | if (module != null) |
@@ -3153,7 +3159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3153 | 3159 | ||
3154 | public void osNpcMoveToTarget(LSL_Key npc, LSL_Vector target, int options) | 3160 | public void osNpcMoveToTarget(LSL_Key npc, LSL_Vector target, int options) |
3155 | { | 3161 | { |
3156 | CheckThreatLevel(ThreatLevel.High, "osNpcMoveToTarget"); | 3162 | //// CheckThreatLevel(ThreatLevel.High, "osNpcMoveToTarget"); |
3157 | 3163 | ||
3158 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3164 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3159 | if (module != null) | 3165 | if (module != null) |
@@ -3177,7 +3183,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3177 | 3183 | ||
3178 | public LSL_Rotation osNpcGetRot(LSL_Key npc) | 3184 | public LSL_Rotation osNpcGetRot(LSL_Key npc) |
3179 | { | 3185 | { |
3180 | CheckThreatLevel(ThreatLevel.High, "osNpcGetRot"); | 3186 | //// CheckThreatLevel(ThreatLevel.High, "osNpcGetRot"); |
3181 | 3187 | ||
3182 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); | 3188 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); |
3183 | if (npcModule != null) | 3189 | if (npcModule != null) |
@@ -3200,7 +3206,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3200 | 3206 | ||
3201 | public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation) | 3207 | public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation) |
3202 | { | 3208 | { |
3203 | CheckThreatLevel(ThreatLevel.High, "osNpcSetRot"); | 3209 | //// CheckThreatLevel(ThreatLevel.High, "osNpcSetRot"); |
3204 | 3210 | ||
3205 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); | 3211 | INPCModule npcModule = World.RequestModuleInterface<INPCModule>(); |
3206 | if (npcModule != null) | 3212 | if (npcModule != null) |
@@ -3221,7 +3227,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3221 | 3227 | ||
3222 | public void osNpcStopMoveToTarget(LSL_Key npc) | 3228 | public void osNpcStopMoveToTarget(LSL_Key npc) |
3223 | { | 3229 | { |
3224 | CheckThreatLevel(ThreatLevel.High, "osNpcStopMoveToTarget"); | 3230 | //// CheckThreatLevel(ThreatLevel.High, "osNpcStopMoveToTarget"); |
3225 | 3231 | ||
3226 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3232 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3227 | if (module != null) | 3233 | if (module != null) |
@@ -3237,7 +3243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3237 | 3243 | ||
3238 | public void osNpcSetProfileAbout(LSL_Key npc, string about) | 3244 | public void osNpcSetProfileAbout(LSL_Key npc, string about) |
3239 | { | 3245 | { |
3240 | CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileAbout"); | 3246 | //// CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileAbout"); |
3241 | 3247 | ||
3242 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3248 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3243 | if (module != null) | 3249 | if (module != null) |
@@ -3255,7 +3261,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3255 | 3261 | ||
3256 | public void osNpcSetProfileImage(LSL_Key npc, string image) | 3262 | public void osNpcSetProfileImage(LSL_Key npc, string image) |
3257 | { | 3263 | { |
3258 | CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileImage"); | 3264 | //// CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileImage"); |
3259 | 3265 | ||
3260 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3266 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3261 | if (module != null) | 3267 | if (module != null) |
@@ -3288,7 +3294,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3288 | 3294 | ||
3289 | public void osNpcSay(LSL_Key npc, int channel, string message) | 3295 | public void osNpcSay(LSL_Key npc, int channel, string message) |
3290 | { | 3296 | { |
3291 | CheckThreatLevel(ThreatLevel.High, "osNpcSay"); | 3297 | //// CheckThreatLevel(ThreatLevel.High, "osNpcSay"); |
3292 | 3298 | ||
3293 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3299 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3294 | if (module != null) | 3300 | if (module != null) |
@@ -3304,7 +3310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3304 | 3310 | ||
3305 | public void osNpcSayTo(LSL_Key npc, LSL_Key target, int channel, string msg) | 3311 | public void osNpcSayTo(LSL_Key npc, LSL_Key target, int channel, string msg) |
3306 | { | 3312 | { |
3307 | CheckThreatLevel(ThreatLevel.High, "osNpcSayTo"); | 3313 | //// CheckThreatLevel(ThreatLevel.High, "osNpcSayTo"); |
3308 | 3314 | ||
3309 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3315 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3310 | if (module == null) | 3316 | if (module == null) |
@@ -3335,7 +3341,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3335 | 3341 | ||
3336 | public void osNpcShout(LSL_Key npc, int channel, string message) | 3342 | public void osNpcShout(LSL_Key npc, int channel, string message) |
3337 | { | 3343 | { |
3338 | CheckThreatLevel(ThreatLevel.High, "osNpcShout"); | 3344 | //// CheckThreatLevel(ThreatLevel.High, "osNpcShout"); |
3339 | 3345 | ||
3340 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3346 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3341 | if (module != null) | 3347 | if (module != null) |
@@ -3351,7 +3357,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3351 | 3357 | ||
3352 | public void osNpcSit(LSL_Key npc, LSL_Key target, int options) | 3358 | public void osNpcSit(LSL_Key npc, LSL_Key target, int options) |
3353 | { | 3359 | { |
3354 | CheckThreatLevel(ThreatLevel.High, "osNpcSit"); | 3360 | //// CheckThreatLevel(ThreatLevel.High, "osNpcSit"); |
3355 | 3361 | ||
3356 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3362 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3357 | if (module != null) | 3363 | if (module != null) |
@@ -3367,7 +3373,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3367 | 3373 | ||
3368 | public void osNpcStand(LSL_Key npc) | 3374 | public void osNpcStand(LSL_Key npc) |
3369 | { | 3375 | { |
3370 | CheckThreatLevel(ThreatLevel.High, "osNpcStand"); | 3376 | //// CheckThreatLevel(ThreatLevel.High, "osNpcStand"); |
3371 | 3377 | ||
3372 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3378 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3373 | if (module != null) | 3379 | if (module != null) |
@@ -3383,7 +3389,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3383 | 3389 | ||
3384 | public void osNpcRemove(LSL_Key npc) | 3390 | public void osNpcRemove(LSL_Key npc) |
3385 | { | 3391 | { |
3386 | CheckThreatLevel(ThreatLevel.High, "osNpcRemove"); | 3392 | //// CheckThreatLevel(ThreatLevel.High, "osNpcRemove"); |
3387 | 3393 | ||
3388 | try | 3394 | try |
3389 | { | 3395 | { |
@@ -3403,7 +3409,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3403 | 3409 | ||
3404 | public void osNpcPlayAnimation(LSL_Key npc, string animation) | 3410 | public void osNpcPlayAnimation(LSL_Key npc, string animation) |
3405 | { | 3411 | { |
3406 | CheckThreatLevel(ThreatLevel.High, "osNpcPlayAnimation"); | 3412 | //// CheckThreatLevel(ThreatLevel.High, "osNpcPlayAnimation"); |
3407 | 3413 | ||
3408 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3414 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3409 | if (module == null) | 3415 | if (module == null) |
@@ -3443,7 +3449,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3443 | 3449 | ||
3444 | public void osNpcStopAnimation(LSL_Key npc, string animation) | 3450 | public void osNpcStopAnimation(LSL_Key npc, string animation) |
3445 | { | 3451 | { |
3446 | CheckThreatLevel(ThreatLevel.High, "osNpcStopAnimation"); | 3452 | //// CheckThreatLevel(ThreatLevel.High, "osNpcStopAnimation"); |
3447 | 3453 | ||
3448 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3454 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3449 | if (module == null) | 3455 | if (module == null) |
@@ -3478,7 +3484,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3478 | 3484 | ||
3479 | public void osNpcWhisper(LSL_Key npc, int channel, string message) | 3485 | public void osNpcWhisper(LSL_Key npc, int channel, string message) |
3480 | { | 3486 | { |
3481 | CheckThreatLevel(ThreatLevel.High, "osNpcWhisper"); | 3487 | //// CheckThreatLevel(ThreatLevel.High, "osNpcWhisper"); |
3482 | 3488 | ||
3483 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3489 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3484 | if (module != null) | 3490 | if (module != null) |
@@ -3494,7 +3500,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3494 | 3500 | ||
3495 | public void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num) | 3501 | public void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num) |
3496 | { | 3502 | { |
3497 | CheckThreatLevel(ThreatLevel.High, "osNpcTouch"); | 3503 | //// CheckThreatLevel(ThreatLevel.High, "osNpcTouch"); |
3498 | 3504 | ||
3499 | INPCModule module = World.RequestModuleInterface<INPCModule>(); | 3505 | INPCModule module = World.RequestModuleInterface<INPCModule>(); |
3500 | int linkNum = link_num.value; | 3506 | int linkNum = link_num.value; |
@@ -3538,7 +3544,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3538 | /// <returns>The asset ID of the notecard saved.</returns> | 3544 | /// <returns>The asset ID of the notecard saved.</returns> |
3539 | public LSL_Key osOwnerSaveAppearance(string notecard) | 3545 | public LSL_Key osOwnerSaveAppearance(string notecard) |
3540 | { | 3546 | { |
3541 | CheckThreatLevel(ThreatLevel.High, "osOwnerSaveAppearance"); | 3547 | //// CheckThreatLevel(ThreatLevel.High, "osOwnerSaveAppearance"); |
3542 | 3548 | ||
3543 | return SaveAppearanceToNotecard(m_host.OwnerID, notecard); | 3549 | return SaveAppearanceToNotecard(m_host.OwnerID, notecard); |
3544 | } | 3550 | } |
@@ -3591,7 +3597,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3591 | /// <returns>"male" or "female" or "unknown"</returns> | 3597 | /// <returns>"male" or "female" or "unknown"</returns> |
3592 | public LSL_String osGetGender(LSL_Key rawAvatarId) | 3598 | public LSL_String osGetGender(LSL_Key rawAvatarId) |
3593 | { | 3599 | { |
3594 | CheckThreatLevel(ThreatLevel.None, "osGetGender"); | 3600 | //// CheckThreatLevel(ThreatLevel.None, "osGetGender"); |
3595 | 3601 | ||
3596 | UUID avatarId; | 3602 | UUID avatarId; |
3597 | if (!UUID.TryParse(rawAvatarId, out avatarId)) | 3603 | if (!UUID.TryParse(rawAvatarId, out avatarId)) |
@@ -3634,7 +3640,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3634 | /// <returns></returns> | 3640 | /// <returns></returns> |
3635 | public LSL_Key osGetMapTexture() | 3641 | public LSL_Key osGetMapTexture() |
3636 | { | 3642 | { |
3637 | CheckThreatLevel(); | 3643 | //// CheckThreatLevel(); |
3638 | 3644 | ||
3639 | return m_ScriptEngine.World.RegionInfo.RegionSettings.TerrainImageID.ToString(); | 3645 | return m_ScriptEngine.World.RegionInfo.RegionSettings.TerrainImageID.ToString(); |
3640 | } | 3646 | } |
@@ -3646,7 +3652,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3646 | /// <returns></returns> | 3652 | /// <returns></returns> |
3647 | public LSL_Key osGetRegionMapTexture(string regionNameOrID) | 3653 | public LSL_Key osGetRegionMapTexture(string regionNameOrID) |
3648 | { | 3654 | { |
3649 | CheckThreatLevel(ThreatLevel.High, "osGetRegionMapTexture"); | 3655 | //// CheckThreatLevel(ThreatLevel.High, "osGetRegionMapTexture"); |
3650 | 3656 | ||
3651 | Scene scene = m_ScriptEngine.World; | 3657 | Scene scene = m_ScriptEngine.World; |
3652 | UUID key = UUID.Zero; | 3658 | UUID key = UUID.Zero; |
@@ -3667,7 +3673,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3667 | if (region != null) | 3673 | if (region != null) |
3668 | key = region.TerrainImage; | 3674 | key = region.TerrainImage; |
3669 | 3675 | ||
3670 | ScriptSleep(1000); | 3676 | //// ScriptSleep(1000); |
3671 | 3677 | ||
3672 | return key.ToString(); | 3678 | return key.ToString(); |
3673 | } | 3679 | } |
@@ -3681,7 +3687,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3681 | /// <returns>List of floats</returns> | 3687 | /// <returns>List of floats</returns> |
3682 | public LSL_List osGetRegionStats() | 3688 | public LSL_List osGetRegionStats() |
3683 | { | 3689 | { |
3684 | CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats"); | 3690 | //// CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats"); |
3685 | 3691 | ||
3686 | LSL_List ret = new LSL_List(); | 3692 | LSL_List ret = new LSL_List(); |
3687 | float[] stats = World.StatsReporter.LastReportedSimStats; | 3693 | float[] stats = World.StatsReporter.LastReportedSimStats; |
@@ -3695,7 +3701,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3695 | 3701 | ||
3696 | public LSL_Vector osGetRegionSize() | 3702 | public LSL_Vector osGetRegionSize() |
3697 | { | 3703 | { |
3698 | CheckThreatLevel(); | 3704 | //// CheckThreatLevel(); |
3699 | 3705 | ||
3700 | Scene scene = m_ScriptEngine.World; | 3706 | Scene scene = m_ScriptEngine.World; |
3701 | RegionInfo reg = World.RegionInfo; | 3707 | RegionInfo reg = World.RegionInfo; |
@@ -3706,7 +3712,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3706 | 3712 | ||
3707 | public int osGetSimulatorMemory() | 3713 | public int osGetSimulatorMemory() |
3708 | { | 3714 | { |
3709 | CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory"); | 3715 | //// CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory"); |
3710 | 3716 | ||
3711 | long pws = Util.GetPhysicalMemUse(); | 3717 | long pws = Util.GetPhysicalMemUse(); |
3712 | 3718 | ||
@@ -3720,7 +3726,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3720 | 3726 | ||
3721 | public int osGetSimulatorMemoryKB() | 3727 | public int osGetSimulatorMemoryKB() |
3722 | { | 3728 | { |
3723 | CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemoryKB"); | 3729 | //// CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemoryKB"); |
3724 | 3730 | ||
3725 | long pws = Util.GetPhysicalMemUse(); | 3731 | long pws = Util.GetPhysicalMemUse(); |
3726 | 3732 | ||
@@ -3749,7 +3755,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3749 | 3755 | ||
3750 | public void osSetOwnerSpeed(LSL_Float SpeedModifier) | 3756 | public void osSetOwnerSpeed(LSL_Float SpeedModifier) |
3751 | { | 3757 | { |
3752 | CheckThreatLevel(ThreatLevel.Moderate, "osSetOwnerSpeed"); | 3758 | //// CheckThreatLevel(ThreatLevel.Moderate, "osSetOwnerSpeed"); |
3753 | 3759 | ||
3754 | if(SpeedModifier > 4) | 3760 | if(SpeedModifier > 4) |
3755 | SpeedModifier = 4; | 3761 | SpeedModifier = 4; |
@@ -3799,7 +3805,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3799 | 3805 | ||
3800 | public LSL_Float osGetHealth(LSL_Key agentKey) | 3806 | public LSL_Float osGetHealth(LSL_Key agentKey) |
3801 | { | 3807 | { |
3802 | CheckThreatLevel(ThreatLevel.None, "osGetHealth"); | 3808 | //// CheckThreatLevel(ThreatLevel.None, "osGetHealth"); |
3803 | 3809 | ||
3804 | LSL_Float health = new LSL_Float(-1); | 3810 | LSL_Float health = new LSL_Float(-1); |
3805 | 3811 | ||
@@ -3898,7 +3904,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3898 | 3904 | ||
3899 | public LSL_Float osGetHealRate(LSL_Key avatar) | 3905 | public LSL_Float osGetHealRate(LSL_Key avatar) |
3900 | { | 3906 | { |
3901 | CheckThreatLevel(ThreatLevel.None, "osGetHealRate"); | 3907 | //// CheckThreatLevel(ThreatLevel.None, "osGetHealRate"); |
3902 | 3908 | ||
3903 | LSL_Float rate = new LSL_Float(0); | 3909 | LSL_Float rate = new LSL_Float(0); |
3904 | 3910 | ||
@@ -3914,7 +3920,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3914 | 3920 | ||
3915 | public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules) | 3921 | public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules) |
3916 | { | 3922 | { |
3917 | CheckThreatLevel(); | 3923 | CheckThreatLevel(ThreatLevel.VeryLow, "osGetPrimitiveParams"); |
3918 | 3924 | ||
3919 | InitLSL(); | 3925 | InitLSL(); |
3920 | return m_LSL_Api.GetPrimitiveParamsEx(prim, rules); | 3926 | return m_LSL_Api.GetPrimitiveParamsEx(prim, rules); |
@@ -3922,7 +3928,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3922 | 3928 | ||
3923 | public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules) | 3929 | public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules) |
3924 | { | 3930 | { |
3925 | CheckThreatLevel(); | 3931 | //// CheckThreatLevel(ThreatLevel.VeryLow, "osSetPrimitiveParams"); |
3926 | 3932 | ||
3927 | InitLSL(); | 3933 | InitLSL(); |
3928 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams"); | 3934 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams"); |
@@ -3966,7 +3972,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3966 | /// </summary> | 3972 | /// </summary> |
3967 | public void osSetProjectionParams(LSL_Key prim, LSL_Integer llprojection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb) | 3973 | public void osSetProjectionParams(LSL_Key prim, LSL_Integer llprojection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb) |
3968 | { | 3974 | { |
3969 | CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams"); | 3975 | //// CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams"); |
3970 | 3976 | ||
3971 | SceneObjectPart obj = null; | 3977 | SceneObjectPart obj = null; |
3972 | if (prim == UUID.Zero.ToString()) | 3978 | if (prim == UUID.Zero.ToString()) |
@@ -4001,7 +4007,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4001 | /// <returns>Strided list of the UUID, position and name of each avatar in the region</returns> | 4007 | /// <returns>Strided list of the UUID, position and name of each avatar in the region</returns> |
4002 | public LSL_List osGetAvatarList() | 4008 | public LSL_List osGetAvatarList() |
4003 | { | 4009 | { |
4004 | CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); | 4010 | //// CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); |
4005 | 4011 | ||
4006 | LSL_List result = new LSL_List(); | 4012 | LSL_List result = new LSL_List(); |
4007 | World.ForEachRootScenePresence(delegate (ScenePresence avatar) | 4013 | World.ForEachRootScenePresence(delegate (ScenePresence avatar) |
@@ -4019,7 +4025,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4019 | 4025 | ||
4020 | public LSL_List osGetNPCList() | 4026 | public LSL_List osGetNPCList() |
4021 | { | 4027 | { |
4022 | CheckThreatLevel(ThreatLevel.None, "osGetNPCList"); | 4028 | //// CheckThreatLevel(ThreatLevel.None, "osGetNPCList"); |
4023 | 4029 | ||
4024 | LSL_List result = new LSL_List(); | 4030 | LSL_List result = new LSL_List(); |
4025 | World.ForEachRootScenePresence(delegate (ScenePresence avatar) | 4031 | World.ForEachRootScenePresence(delegate (ScenePresence avatar) |
@@ -4043,7 +4049,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4043 | /// <returns></returns> | 4049 | /// <returns></returns> |
4044 | public LSL_String osUnixTimeToTimestamp(LSL_Integer time) | 4050 | public LSL_String osUnixTimeToTimestamp(LSL_Integer time) |
4045 | { | 4051 | { |
4046 | CheckThreatLevel(ThreatLevel.VeryLow, "osUnixTimeToTimestamp"); | 4052 | //// CheckThreatLevel(ThreatLevel.VeryLow, "osUnixTimeToTimestamp"); |
4047 | 4053 | ||
4048 | long baseTicks = 621355968000000000; | 4054 | long baseTicks = 621355968000000000; |
4049 | long tickResolution = 10000000; | 4055 | long tickResolution = 10000000; |
@@ -4251,7 +4257,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4251 | 4257 | ||
4252 | public void osForceDetachFromAvatar() | 4258 | public void osForceDetachFromAvatar() |
4253 | { | 4259 | { |
4254 | CheckThreatLevel(ThreatLevel.High, "osForceDetachFromAvatar"); | 4260 | CheckThreatLevel(ThreatLevel.VeryHigh, "osForceDetachFromAvatar"); |
4255 | 4261 | ||
4256 | InitLSL(); | 4262 | InitLSL(); |
4257 | m_LSL_Api.DetachFromAvatar(); | 4263 | m_LSL_Api.DetachFromAvatar(); |
@@ -4402,7 +4408,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4402 | /// <returns>1 if thing is a valid UUID, 0 otherwise</returns> | 4408 | /// <returns>1 if thing is a valid UUID, 0 otherwise</returns> |
4403 | public LSL_Integer osIsUUID(string thing) | 4409 | public LSL_Integer osIsUUID(string thing) |
4404 | { | 4410 | { |
4405 | CheckThreatLevel(); | 4411 | //// CheckThreatLevel(); |
4406 | 4412 | ||
4407 | UUID test; | 4413 | UUID test; |
4408 | return UUID.TryParse(thing, out test) ? 1 : 0; | 4414 | return UUID.TryParse(thing, out test) ? 1 : 0; |
@@ -4416,7 +4422,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4416 | /// <returns></returns> | 4422 | /// <returns></returns> |
4417 | public LSL_Float osMin(double a, double b) | 4423 | public LSL_Float osMin(double a, double b) |
4418 | { | 4424 | { |
4419 | CheckThreatLevel(); | 4425 | //// CheckThreatLevel(); |
4420 | 4426 | ||
4421 | return Math.Min(a, b); | 4427 | return Math.Min(a, b); |
4422 | } | 4428 | } |
@@ -4429,14 +4435,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4429 | /// <returns></returns> | 4435 | /// <returns></returns> |
4430 | public LSL_Float osMax(double a, double b) | 4436 | public LSL_Float osMax(double a, double b) |
4431 | { | 4437 | { |
4432 | CheckThreatLevel(); | 4438 | //// CheckThreatLevel(); |
4433 | 4439 | ||
4434 | return Math.Max(a, b); | 4440 | return Math.Max(a, b); |
4435 | } | 4441 | } |
4436 | 4442 | ||
4437 | public LSL_Key osGetRezzingObject() | 4443 | public LSL_Key osGetRezzingObject() |
4438 | { | 4444 | { |
4439 | CheckThreatLevel(ThreatLevel.None, "osGetRezzingObject"); | 4445 | //// CheckThreatLevel(ThreatLevel.None, "osGetRezzingObject"); |
4440 | 4446 | ||
4441 | UUID rezID = m_host.ParentGroup.RezzerID; | 4447 | UUID rezID = m_host.ParentGroup.RezzerID; |
4442 | if(rezID == UUID.Zero || m_host.ParentGroup.Scene.GetScenePresence(rezID) != null) | 4448 | if(rezID == UUID.Zero || m_host.ParentGroup.Scene.GetScenePresence(rezID) != null) |
@@ -4450,7 +4456,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4450 | /// <returns></returns> | 4456 | /// <returns></returns> |
4451 | public void osSetContentType(LSL_Key id, string type) | 4457 | public void osSetContentType(LSL_Key id, string type) |
4452 | { | 4458 | { |
4453 | CheckThreatLevel(ThreatLevel.Severe, "osSetContentType"); | 4459 | CheckThreatLevel(ThreatLevel.Moderate, "osSetContentType"); |
4454 | 4460 | ||
4455 | if (m_UrlModule != null) | 4461 | if (m_UrlModule != null) |
4456 | m_UrlModule.HttpContentType(new UUID(id),type); | 4462 | m_UrlModule.HttpContentType(new UUID(id),type); |
@@ -4539,7 +4545,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4539 | 4545 | ||
4540 | public LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield) | 4546 | public LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield) |
4541 | { | 4547 | { |
4542 | CheckThreatLevel(ThreatLevel.Low, "osListenRegex"); | 4548 | //// CheckThreatLevel(ThreatLevel.Low, "osListenRegex"); |
4543 | 4549 | ||
4544 | UUID keyID; | 4550 | UUID keyID; |
4545 | UUID.TryParse(ID, out keyID); | 4551 | UUID.TryParse(ID, out keyID); |
@@ -4587,7 +4593,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4587 | 4593 | ||
4588 | public LSL_Integer osRegexIsMatch(string input, string pattern) | 4594 | public LSL_Integer osRegexIsMatch(string input, string pattern) |
4589 | { | 4595 | { |
4590 | CheckThreatLevel(ThreatLevel.Low, "osRegexIsMatch"); | 4596 | //// CheckThreatLevel(ThreatLevel.Low, "osRegexIsMatch"); |
4591 | 4597 | ||
4592 | try | 4598 | try |
4593 | { | 4599 | { |
@@ -4636,7 +4642,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4636 | 4642 | ||
4637 | public void osCollisionSound(string impact_sound, double impact_volume) | 4643 | public void osCollisionSound(string impact_sound, double impact_volume) |
4638 | { | 4644 | { |
4639 | CheckThreatLevel(); | 4645 | //// CheckThreatLevel(); |
4640 | 4646 | ||
4641 | if(impact_sound == "") | 4647 | if(impact_sound == "") |
4642 | { | 4648 | { |
@@ -4668,7 +4674,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4668 | // still not very usefull, detector is lost on rez, restarts, etc | 4674 | // still not very usefull, detector is lost on rez, restarts, etc |
4669 | public void osVolumeDetect(int detect) | 4675 | public void osVolumeDetect(int detect) |
4670 | { | 4676 | { |
4671 | CheckThreatLevel(); | 4677 | //// CheckThreatLevel(); |
4672 | 4678 | ||
4673 | if (m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted || m_host.ParentGroup.IsAttachment) | 4679 | if (m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted || m_host.ParentGroup.IsAttachment) |
4674 | return; | 4680 | return; |
@@ -4690,7 +4696,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4690 | /// </returns> | 4696 | /// </returns> |
4691 | public LSL_List osGetInertiaData() | 4697 | public LSL_List osGetInertiaData() |
4692 | { | 4698 | { |
4693 | CheckThreatLevel(); | 4699 | //// CheckThreatLevel(); |
4694 | 4700 | ||
4695 | LSL_List result = new LSL_List(); | 4701 | LSL_List result = new LSL_List(); |
4696 | float TotalMass; | 4702 | float TotalMass; |
@@ -4737,7 +4743,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4737 | 4743 | ||
4738 | public void osSetInertia(LSL_Float mass, LSL_Vector centerOfMass, LSL_Vector principalInertiaScaled, LSL_Rotation lslrot) | 4744 | public void osSetInertia(LSL_Float mass, LSL_Vector centerOfMass, LSL_Vector principalInertiaScaled, LSL_Rotation lslrot) |
4739 | { | 4745 | { |
4740 | CheckThreatLevel(); | 4746 | //// CheckThreatLevel(); |
4741 | 4747 | ||
4742 | SceneObjectGroup sog = m_host.ParentGroup; | 4748 | SceneObjectGroup sog = m_host.ParentGroup; |
4743 | if(sog== null || sog.IsDeleted) | 4749 | if(sog== null || sog.IsDeleted) |
@@ -4775,7 +4781,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4775 | /// </remarks> | 4781 | /// </remarks> |
4776 | public void osSetInertiaAsBox(LSL_Float mass, LSL_Vector boxSize, LSL_Vector centerOfMass, LSL_Rotation lslrot) | 4782 | public void osSetInertiaAsBox(LSL_Float mass, LSL_Vector boxSize, LSL_Vector centerOfMass, LSL_Rotation lslrot) |
4777 | { | 4783 | { |
4778 | CheckThreatLevel(); | 4784 | //// CheckThreatLevel(); |
4779 | 4785 | ||
4780 | SceneObjectGroup sog = m_host.ParentGroup; | 4786 | SceneObjectGroup sog = m_host.ParentGroup; |
4781 | if(sog== null || sog.IsDeleted) | 4787 | if(sog== null || sog.IsDeleted) |
@@ -4816,7 +4822,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4816 | /// </remarks> | 4822 | /// </remarks> |
4817 | public void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, LSL_Vector centerOfMass) | 4823 | public void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, LSL_Vector centerOfMass) |
4818 | { | 4824 | { |
4819 | CheckThreatLevel(); | 4825 | //// CheckThreatLevel(); |
4820 | 4826 | ||
4821 | SceneObjectGroup sog = m_host.ParentGroup; | 4827 | SceneObjectGroup sog = m_host.ParentGroup; |
4822 | if(sog== null || sog.IsDeleted) | 4828 | if(sog== null || sog.IsDeleted) |
@@ -4855,7 +4861,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4855 | /// </remarks> | 4861 | /// </remarks> |
4856 | public void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, LSL_Vector centerOfMass, LSL_Rotation lslrot) | 4862 | public void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, LSL_Vector centerOfMass, LSL_Rotation lslrot) |
4857 | { | 4863 | { |
4858 | CheckThreatLevel(); | 4864 | //// CheckThreatLevel(); |
4859 | 4865 | ||
4860 | SceneObjectGroup sog = m_host.ParentGroup; | 4866 | SceneObjectGroup sog = m_host.ParentGroup; |
4861 | if(sog== null || sog.IsDeleted) | 4867 | if(sog== null || sog.IsDeleted) |
@@ -4893,7 +4899,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4893 | /// </summary> | 4899 | /// </summary> |
4894 | public void osClearInertia() | 4900 | public void osClearInertia() |
4895 | { | 4901 | { |
4896 | CheckThreatLevel(); | 4902 | //// CheckThreatLevel(); |
4897 | 4903 | ||
4898 | SceneObjectGroup sog = m_host.ParentGroup; | 4904 | SceneObjectGroup sog = m_host.ParentGroup; |
4899 | if(sog== null || sog.IsDeleted) | 4905 | if(sog== null || sog.IsDeleted) |
@@ -4951,7 +4957,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4951 | /// </remarks> | 4957 | /// </remarks> |
4952 | public LSL_Integer osTeleportObject(LSL_Key objectUUID, LSL_Vector targetPos, LSL_Rotation rotation, LSL_Integer flags) | 4958 | public LSL_Integer osTeleportObject(LSL_Key objectUUID, LSL_Vector targetPos, LSL_Rotation rotation, LSL_Integer flags) |
4953 | { | 4959 | { |
4954 | CheckThreatLevel(ThreatLevel.Severe, "osTeleportObject"); | 4960 | //// CheckThreatLevel(ThreatLevel.Severe, "osTeleportObject"); |
4955 | 4961 | ||
4956 | UUID objUUID; | 4962 | UUID objUUID; |
4957 | if (!UUID.TryParse(objectUUID, out objUUID)) | 4963 | if (!UUID.TryParse(objectUUID, out objUUID)) |
@@ -4979,7 +4985,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4979 | 4985 | ||
4980 | public LSL_Integer osGetLinkNumber(LSL_String name) | 4986 | public LSL_Integer osGetLinkNumber(LSL_String name) |
4981 | { | 4987 | { |
4982 | CheckThreatLevel(); | 4988 | //// CheckThreatLevel(); |
4983 | 4989 | ||
4984 | SceneObjectGroup sog = m_host.ParentGroup; | 4990 | SceneObjectGroup sog = m_host.ParentGroup; |
4985 | if(sog== null || sog.IsDeleted) | 4991 | if(sog== null || sog.IsDeleted) |
@@ -5017,7 +5023,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5017 | 5023 | ||
5018 | public void osAdjustSoundVolume(LSL_Integer linknum, LSL_Float volume) | 5024 | public void osAdjustSoundVolume(LSL_Integer linknum, LSL_Float volume) |
5019 | { | 5025 | { |
5020 | m_host.AddScriptLPS(1); | 5026 | //// m_host.AddScriptLPS(1); |
5021 | SceneObjectPart sop = GetSingleLinkPart(linknum); | 5027 | SceneObjectPart sop = GetSingleLinkPart(linknum); |
5022 | if(sop == null) | 5028 | if(sop == null) |
5023 | return; | 5029 | return; |
@@ -5026,7 +5032,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5026 | 5032 | ||
5027 | public void osSetSoundRadius(LSL_Integer linknum, LSL_Float radius) | 5033 | public void osSetSoundRadius(LSL_Integer linknum, LSL_Float radius) |
5028 | { | 5034 | { |
5029 | m_host.AddScriptLPS(1); | 5035 | //// m_host.AddScriptLPS(1); |
5030 | SceneObjectPart sop = GetSingleLinkPart(linknum); | 5036 | SceneObjectPart sop = GetSingleLinkPart(linknum); |
5031 | if(sop == null) | 5037 | if(sop == null) |
5032 | return; | 5038 | return; |
@@ -5035,7 +5041,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5035 | 5041 | ||
5036 | public void osPlaySound(LSL_Integer linknum, LSL_String sound, LSL_Float volume) | 5042 | public void osPlaySound(LSL_Integer linknum, LSL_String sound, LSL_Float volume) |
5037 | { | 5043 | { |
5038 | m_host.AddScriptLPS(1); | 5044 | //// m_host.AddScriptLPS(1); |
5039 | 5045 | ||
5040 | if (m_SoundModule == null) | 5046 | if (m_SoundModule == null) |
5041 | return; | 5047 | return; |
@@ -5054,7 +5060,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5054 | 5060 | ||
5055 | public void osLoopSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume) | 5061 | public void osLoopSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume) |
5056 | { | 5062 | { |
5057 | m_host.AddScriptLPS(1); | 5063 | //// m_host.AddScriptLPS(1); |
5058 | 5064 | ||
5059 | if (m_SoundModule == null) | 5065 | if (m_SoundModule == null) |
5060 | return; | 5066 | return; |
@@ -5072,7 +5078,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5072 | 5078 | ||
5073 | public void osLoopSoundMaster(LSL_Integer linknum, LSL_String sound, LSL_Float volume) | 5079 | public void osLoopSoundMaster(LSL_Integer linknum, LSL_String sound, LSL_Float volume) |
5074 | { | 5080 | { |
5075 | m_host.AddScriptLPS(1); | 5081 | //// m_host.AddScriptLPS(1); |
5076 | 5082 | ||
5077 | if (m_SoundModule == null) | 5083 | if (m_SoundModule == null) |
5078 | return; | 5084 | return; |
@@ -5090,7 +5096,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5090 | 5096 | ||
5091 | public void osLoopSoundSlave(LSL_Integer linknum, LSL_String sound, LSL_Float volume) | 5097 | public void osLoopSoundSlave(LSL_Integer linknum, LSL_String sound, LSL_Float volume) |
5092 | { | 5098 | { |
5093 | m_host.AddScriptLPS(1); | 5099 | //// m_host.AddScriptLPS(1); |
5094 | 5100 | ||
5095 | if (m_SoundModule == null) | 5101 | if (m_SoundModule == null) |
5096 | return; | 5102 | return; |
@@ -5108,7 +5114,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5108 | 5114 | ||
5109 | public void osPlaySoundSlave(LSL_Integer linknum, LSL_String sound, LSL_Float volume) | 5115 | public void osPlaySoundSlave(LSL_Integer linknum, LSL_String sound, LSL_Float volume) |
5110 | { | 5116 | { |
5111 | m_host.AddScriptLPS(1); | 5117 | //// m_host.AddScriptLPS(1); |
5112 | 5118 | ||
5113 | if (m_SoundModule == null) | 5119 | if (m_SoundModule == null) |
5114 | return; | 5120 | return; |
@@ -5127,7 +5133,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5127 | 5133 | ||
5128 | public void osTriggerSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume) | 5134 | public void osTriggerSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume) |
5129 | { | 5135 | { |
5130 | m_host.AddScriptLPS(1); | 5136 | //// m_host.AddScriptLPS(1); |
5131 | 5137 | ||
5132 | if (m_SoundModule == null) | 5138 | if (m_SoundModule == null) |
5133 | return; | 5139 | return; |
@@ -5147,7 +5153,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5147 | public void osTriggerSoundLimited(LSL_Integer linknum, LSL_String sound, LSL_Float volume, | 5153 | public void osTriggerSoundLimited(LSL_Integer linknum, LSL_String sound, LSL_Float volume, |
5148 | LSL_Vector top_north_east, LSL_Vector bottom_south_west) | 5154 | LSL_Vector top_north_east, LSL_Vector bottom_south_west) |
5149 | { | 5155 | { |
5150 | m_host.AddScriptLPS(1); | 5156 | //// m_host.AddScriptLPS(1); |
5151 | 5157 | ||
5152 | if (m_SoundModule == null) | 5158 | if (m_SoundModule == null) |
5153 | return; | 5159 | return; |
@@ -5166,7 +5172,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5166 | 5172 | ||
5167 | public void osStopSound(LSL_Integer linknum) | 5173 | public void osStopSound(LSL_Integer linknum) |
5168 | { | 5174 | { |
5169 | m_host.AddScriptLPS(1); | 5175 | //// m_host.AddScriptLPS(1); |
5170 | 5176 | ||
5171 | if (m_SoundModule == null) | 5177 | if (m_SoundModule == null) |
5172 | return; | 5178 | return; |
@@ -5180,7 +5186,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5180 | 5186 | ||
5181 | public void osPreloadSound(LSL_Integer linknum, LSL_String sound) | 5187 | public void osPreloadSound(LSL_Integer linknum, LSL_String sound) |
5182 | { | 5188 | { |
5183 | m_host.AddScriptLPS(1); | 5189 | //// m_host.AddScriptLPS(1); |
5184 | 5190 | ||
5185 | if (m_SoundModule == null) | 5191 | if (m_SoundModule == null) |
5186 | return; | 5192 | return; |
@@ -5194,7 +5200,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5194 | return; | 5200 | return; |
5195 | 5201 | ||
5196 | m_SoundModule.PreloadSound(sop.UUID, soundID); | 5202 | m_SoundModule.PreloadSound(sop.UUID, soundID); |
5197 | ScriptSleep(1000); | 5203 | //// ScriptSleep(1000); |
5198 | } | 5204 | } |
5199 | 5205 | ||
5200 | // get only one part | 5206 | // get only one part |
@@ -5232,7 +5238,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5232 | 5238 | ||
5233 | public LSL_String osDetectedCountry(LSL_Integer number) | 5239 | public LSL_String osDetectedCountry(LSL_Integer number) |
5234 | { | 5240 | { |
5235 | m_host.AddScriptLPS(1); | 5241 | //// m_host.AddScriptLPS(1); |
5236 | CheckThreatLevel(ThreatLevel.Moderate, "osDetectedCountry"); | 5242 | CheckThreatLevel(ThreatLevel.Moderate, "osDetectedCountry"); |
5237 | 5243 | ||
5238 | if (World.UserAccountService == null) | 5244 | if (World.UserAccountService == null) |
@@ -5249,7 +5255,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5249 | 5255 | ||
5250 | public LSL_String osGetAgentCountry(LSL_Key id) | 5256 | public LSL_String osGetAgentCountry(LSL_Key id) |
5251 | { | 5257 | { |
5252 | m_host.AddScriptLPS(1); | 5258 | //// m_host.AddScriptLPS(1); |
5253 | CheckThreatLevel(ThreatLevel.Moderate, "osGetAgentCountry"); | 5259 | CheckThreatLevel(ThreatLevel.Moderate, "osGetAgentCountry"); |
5254 | 5260 | ||
5255 | if (World.UserAccountService == null) | 5261 | if (World.UserAccountService == null) |
@@ -5275,8 +5281,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5275 | 5281 | ||
5276 | public LSL_String osStringSubString(LSL_String src, LSL_Integer offset) | 5282 | public LSL_String osStringSubString(LSL_String src, LSL_Integer offset) |
5277 | { | 5283 | { |
5278 | m_host.AddScriptLPS(1); | 5284 | //// m_host.AddScriptLPS(1); |
5279 | CheckThreatLevel(); | 5285 | //// CheckThreatLevel(); |
5280 | 5286 | ||
5281 | if (string.IsNullOrEmpty(src)) | 5287 | if (string.IsNullOrEmpty(src)) |
5282 | return ""; | 5288 | return ""; |
@@ -5289,8 +5295,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5289 | 5295 | ||
5290 | public LSL_String osStringSubString(LSL_String src, LSL_Integer offset, LSL_Integer length) | 5296 | public LSL_String osStringSubString(LSL_String src, LSL_Integer offset, LSL_Integer length) |
5291 | { | 5297 | { |
5292 | m_host.AddScriptLPS(1); | 5298 | //// m_host.AddScriptLPS(1); |
5293 | CheckThreatLevel(); | 5299 | //// CheckThreatLevel(); |
5294 | 5300 | ||
5295 | if (string.IsNullOrEmpty(src)) | 5301 | if (string.IsNullOrEmpty(src)) |
5296 | return ""; | 5302 | return ""; |
@@ -5309,8 +5315,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5309 | 5315 | ||
5310 | public LSL_Integer osStringStartsWith(LSL_String src, LSL_String value, LSL_Integer ignorecase) | 5316 | public LSL_Integer osStringStartsWith(LSL_String src, LSL_String value, LSL_Integer ignorecase) |
5311 | { | 5317 | { |
5312 | m_host.AddScriptLPS(1); | 5318 | //// m_host.AddScriptLPS(1); |
5313 | CheckThreatLevel(); | 5319 | //// CheckThreatLevel(); |
5314 | 5320 | ||
5315 | if (string.IsNullOrEmpty(src)) | 5321 | if (string.IsNullOrEmpty(src)) |
5316 | return 0; | 5322 | return 0; |
@@ -5323,8 +5329,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5323 | 5329 | ||
5324 | public LSL_Integer osStringEndsWith(LSL_String src, LSL_String value, LSL_Integer ignorecase) | 5330 | public LSL_Integer osStringEndsWith(LSL_String src, LSL_String value, LSL_Integer ignorecase) |
5325 | { | 5331 | { |
5326 | m_host.AddScriptLPS(1); | 5332 | //// m_host.AddScriptLPS(1); |
5327 | CheckThreatLevel(); | 5333 | //// CheckThreatLevel(); |
5328 | 5334 | ||
5329 | if (string.IsNullOrEmpty(src)) | 5335 | if (string.IsNullOrEmpty(src)) |
5330 | return 0; | 5336 | return 0; |
@@ -5337,8 +5343,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5337 | 5343 | ||
5338 | public LSL_Integer osStringIndexOf(LSL_String src, LSL_String value, LSL_Integer ignorecase) | 5344 | public LSL_Integer osStringIndexOf(LSL_String src, LSL_String value, LSL_Integer ignorecase) |
5339 | { | 5345 | { |
5340 | m_host.AddScriptLPS(1); | 5346 | //// m_host.AddScriptLPS(1); |
5341 | CheckThreatLevel(); | 5347 | //// CheckThreatLevel(); |
5342 | 5348 | ||
5343 | if (string.IsNullOrEmpty(src)) | 5349 | if (string.IsNullOrEmpty(src)) |
5344 | return -1; | 5350 | return -1; |
@@ -5353,8 +5359,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5353 | public LSL_Integer osStringIndexOf(LSL_String src, LSL_String value, | 5359 | public LSL_Integer osStringIndexOf(LSL_String src, LSL_String value, |
5354 | LSL_Integer offset, LSL_Integer count, LSL_Integer ignorecase) | 5360 | LSL_Integer offset, LSL_Integer count, LSL_Integer ignorecase) |
5355 | { | 5361 | { |
5356 | m_host.AddScriptLPS(1); | 5362 | //// m_host.AddScriptLPS(1); |
5357 | CheckThreatLevel(); | 5363 | //// CheckThreatLevel(); |
5358 | 5364 | ||
5359 | if (string.IsNullOrEmpty(src)) | 5365 | if (string.IsNullOrEmpty(src)) |
5360 | return -1; | 5366 | return -1; |
@@ -5377,8 +5383,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5377 | 5383 | ||
5378 | public LSL_Integer osStringLastIndexOf(LSL_String src, LSL_String value, LSL_Integer ignorecase) | 5384 | public LSL_Integer osStringLastIndexOf(LSL_String src, LSL_String value, LSL_Integer ignorecase) |
5379 | { | 5385 | { |
5380 | m_host.AddScriptLPS(1); | 5386 | //// m_host.AddScriptLPS(1); |
5381 | CheckThreatLevel(); | 5387 | //// CheckThreatLevel(); |
5382 | 5388 | ||
5383 | if (string.IsNullOrEmpty(src)) | 5389 | if (string.IsNullOrEmpty(src)) |
5384 | return -1; | 5390 | return -1; |
@@ -5393,8 +5399,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5393 | public LSL_Integer osStringLastIndexOf(LSL_String src, LSL_String value, | 5399 | public LSL_Integer osStringLastIndexOf(LSL_String src, LSL_String value, |
5394 | LSL_Integer offset, LSL_Integer count, LSL_Integer ignorecase) | 5400 | LSL_Integer offset, LSL_Integer count, LSL_Integer ignorecase) |
5395 | { | 5401 | { |
5396 | m_host.AddScriptLPS(1); | 5402 | //// m_host.AddScriptLPS(1); |
5397 | CheckThreatLevel(); | 5403 | //// CheckThreatLevel(); |
5398 | 5404 | ||
5399 | if (string.IsNullOrEmpty(src)) | 5405 | if (string.IsNullOrEmpty(src)) |
5400 | return -1; | 5406 | return -1; |
@@ -5547,7 +5553,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5547 | 5553 | ||
5548 | public LSL_Key osGetInventoryLastOwner(LSL_String itemNameorid) | 5554 | public LSL_Key osGetInventoryLastOwner(LSL_String itemNameorid) |
5549 | { | 5555 | { |
5550 | m_host.AddScriptLPS(1); | 5556 | //// m_host.AddScriptLPS(1); |
5551 | 5557 | ||
5552 | TaskInventoryItem item = null; | 5558 | TaskInventoryItem item = null; |
5553 | UUID itemID; | 5559 | UUID itemID; |
@@ -5567,7 +5573,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5567 | 5573 | ||
5568 | public LSL_Key osGetInventoryItemKey(LSL_String name) | 5574 | public LSL_Key osGetInventoryItemKey(LSL_String name) |
5569 | { | 5575 | { |
5570 | m_host.AddScriptLPS(1); | 5576 | //// m_host.AddScriptLPS(1); |
5571 | 5577 | ||
5572 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); | 5578 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); |
5573 | 5579 | ||
@@ -5586,7 +5592,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5586 | 5592 | ||
5587 | public LSL_String osGetInventoryName(LSL_Key itemId) | 5593 | public LSL_String osGetInventoryName(LSL_Key itemId) |
5588 | { | 5594 | { |
5589 | m_host.AddScriptLPS(1); | 5595 | //// m_host.AddScriptLPS(1); |
5590 | 5596 | ||
5591 | TaskInventoryItem item = null; | 5597 | TaskInventoryItem item = null; |
5592 | UUID itemID; | 5598 | UUID itemID; |
@@ -5601,7 +5607,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5601 | 5607 | ||
5602 | public LSL_String osGetInventoryDesc(LSL_String itemNameorid) | 5608 | public LSL_String osGetInventoryDesc(LSL_String itemNameorid) |
5603 | { | 5609 | { |
5604 | m_host.AddScriptLPS(1); | 5610 | //// m_host.AddScriptLPS(1); |
5605 | 5611 | ||
5606 | TaskInventoryItem item = null; | 5612 | TaskInventoryItem item = null; |
5607 | UUID itemID; | 5613 | UUID itemID; |
@@ -5618,7 +5624,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5618 | 5624 | ||
5619 | public LSL_Key osGetLastChangedEventKey() | 5625 | public LSL_Key osGetLastChangedEventKey() |
5620 | { | 5626 | { |
5621 | m_host.AddScriptLPS(1); | 5627 | //// m_host.AddScriptLPS(1); |
5622 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, 0); | 5628 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, 0); |
5623 | if (detectedParams == null) | 5629 | if (detectedParams == null) |
5624 | return String.Empty; | 5630 | return String.Empty; |
@@ -5628,7 +5634,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5628 | // returns PST or PDT wall clock | 5634 | // returns PST or PDT wall clock |
5629 | public LSL_Float osGetPSTWallclock() | 5635 | public LSL_Float osGetPSTWallclock() |
5630 | { | 5636 | { |
5631 | m_host.AddScriptLPS(1); | 5637 | //// m_host.AddScriptLPS(1); |
5632 | if(PSTTimeZone == null) | 5638 | if(PSTTimeZone == null) |
5633 | return DateTime.Now.TimeOfDay.TotalSeconds; | 5639 | return DateTime.Now.TimeOfDay.TotalSeconds; |
5634 | 5640 | ||